kspread_dlg_database.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __kspread_dlg_database__
00023 #define __kspread_dlg_database__
00024
00025 #include <qdialog.h>
00026 #include <qrect.h>
00027
00028 #include <kwizard.h>
00029
00030 class KSpreadView;
00031
00032 class QCheckBox;
00033 class QComboBox;
00034 class QFrame;
00035 class QGridLayout;
00036 class QLabel;
00037 class QLineEdit;
00038 class QListViewItem;
00039 class QHBoxLayout;
00040 class QRadioButton;
00041 class QSqlDatabase;
00042 class QTextEdit;
00043 class QVBoxLayout;
00044 class QWidget;
00045
00046 class KListView;
00047 class KPushButton;
00048
00049 class KSpreadDatabaseDlg : public KWizard
00050 {
00051 Q_OBJECT
00052
00053 public:
00054 enum PageId { eDatabase = 0, eSheets = 1, eColumns = 2, eOptions = 3, eResult = 4 };
00055
00056 KSpreadDatabaseDlg( KSpreadView * parent, QRect const & rect, const char * name = 0, bool modal = FALSE, WFlags fl = 0 );
00057 virtual ~KSpreadDatabaseDlg();
00058
00059 private slots:
00060 void orBox_clicked();
00061 void andBox_clicked();
00062 void startingCell_clicked();
00063 void startingRegion_clicked();
00064 void connectButton_clicked();
00065 void databaseNameChanged( const QString & s );
00066 void databaseHostChanged( const QString & s );
00067 void databaseDriverChanged( int );
00068 void popupSheetViewMenu( QListViewItem *, const QPoint &, int );
00069 void sheetViewClicked( QListViewItem * );
00070 void accept();
00071
00072 protected:
00073 void next();
00074 void back();
00075
00076 QGridLayout * m_databaseLayout;
00077 QGridLayout * m_sheetLayout;
00078 QGridLayout * m_columnsLayout;
00079 QGridLayout * m_optionsLayout;
00080 QGridLayout * m_resultLayout;
00081
00082 private:
00083 int m_currentPage;
00084 KSpreadView * m_pView;
00085 QRect m_targetRect;
00086 QSqlDatabase * m_dbConnection;
00087
00088 QWidget * m_database;
00089 QLabel * m_databaseStatus;
00090 QLineEdit * m_username;
00091 QLineEdit * m_port;
00092 QLineEdit * m_databaseName;
00093 QComboBox * m_driver;
00094 QLineEdit * m_password;
00095 QLineEdit * m_host;
00096 QLabel * m_Type;
00097 QWidget * m_sheet;
00098 QComboBox * m_databaseList;
00099 KPushButton * m_connectButton;
00100 QLabel * m_sheetStatus;
00101 QLabel * m_SelectSheetLabel;
00102 KListView * m_sheetView;
00103 QWidget * m_columns;
00104 KListView * m_columnView;
00105 QLabel * m_columnsStatus;
00106 QWidget * m_options;
00107 QComboBox * m_columns_1;
00108 QComboBox * m_columns_2;
00109 QComboBox * m_columns_3;
00110 QComboBox * m_operator_1;
00111 QComboBox * m_operator_2;
00112 QComboBox * m_operator_3;
00113 QLineEdit * m_operatorValue_1;
00114 QLineEdit * m_operatorValue_2;
00115 QLineEdit * m_operatorValue_3;
00116 QRadioButton * m_andBox;
00117 QRadioButton * m_orBox;
00118 QComboBox * m_columnsSort_1;
00119 QComboBox * m_columnsSort_2;
00120 QComboBox * m_sortMode_1;
00121 QComboBox * m_sortMode_2;
00122 QCheckBox * m_distinct;
00123 QWidget * m_result;
00124 QTextEdit * m_sqlQuery;
00125 QRadioButton * m_startingRegion;
00126 QLineEdit * m_cell;
00127 QLineEdit * m_region;
00128 QRadioButton * m_startingCell;
00129
00130 void switchPage( int id );
00131 bool databaseDoNext();
00132 bool sheetsDoNext();
00133 bool columnsDoNext();
00134 bool optionsDoNext();
00135
00136 QString exchangeWildcards(QString const & value);
00137 QString getWhereCondition( QString const &, QString const &, int );
00138 };
00139
00140 #endif
This file is part of the documentation for kspread Library Version 1.4.2.