filters

kspread_kexiimportdialog.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Adam Pigg                                       *
00003  *   adam@piggz.co.uk                                                      *
00004  *                                                                         *
00005  *   Based on insert calendar code:                                        *
00006  *   Copyright (C) 2005 by Raphael Langerhorst                             *
00007  *   raphael-langerhorst@gmx.at                                            *
00008  *                                                                         *
00009  *   Permission is hereby granted, free of charge, to any person obtaining *
00010  *   a copy of this software and associated documentation files (the       *
00011  *   "Software"), to deal in the Software without restriction, including   *
00012  *   without limitation the rights to use, copy, modify, merge, publish,   *
00013  *   distribute, sublicense, and/or sell copies of the Software, and to    *
00014  *   permit persons to whom the Software is furnished to do so, subject to *
00015  *   the following conditions:                                             *
00016  *                                                                         *
00017  *   The above copyright notice and this permission notice shall be        *
00018  *   included in all copies or substantial portions of the Software.       *
00019  *                                                                         *
00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00026  *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00027  ***************************************************************************/
00028 
00029 #ifndef KSPREAD_KEXIIMPORTDIALOG_H
00030 #define KSPREAD_KEXIIMPORTDIALOG_H
00031 
00032 #include "kspread_kexiimportdialogbase.h"
00033 #include <koffice_export.h>
00034 
00035 namespace KexiDB
00036 {
00037 class Connection;
00038 class ConnectionData;
00039 class DriverManager;
00040 class Driver;
00041 class TableOrQuerySchema;
00042 }
00043 
00044 namespace KSpread
00045 {
00046 class View;
00047 }
00048 
00049 class KListViewItem;
00050 
00051 class KSpreadKexiImportDialog : public KSpreadKexiImportDialogBase
00052 {
00053     Q_OBJECT
00054 
00055 private:
00056     
00057     void populateTables();
00058     void populateSheets();
00059     KexiDB::Connection *conn;
00060     KexiDB::DriverManager *dm;
00061 
00062     KSpread::View *m_kspreadView;
00063 public:
00064 
00070     KSpreadKexiImportDialog(QWidget* parent = 0, const char* name = 0);
00071 
00075     virtual ~KSpreadKexiImportDialog();
00076 
00077     void openDatabase(QString,KexiDB::ConnectionData *cdata);
00078     KexiDB::Connection *connection()
00079     {
00080         return conn;
00081     };
00082     
00083     bool customQuery();
00084     QString customQueryString();
00085     int conversion(); //1: kspread 2: text ..... possibly add more option
00086     QPtrList<QListViewItem> selectedItems();
00087     
00088 protected slots:
00089 
00100     virtual void accept();
00101 
00111     virtual void reject();
00112 
00113 signals:
00114 
00123     void insertKexi();
00124 };
00125 
00126 
00127 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys