22#ifndef __kspread_dlg_database__
23#define __kspread_dlg_database__
50class DatabaseDialog :
public KWizard
56 enum PageId { eDatabase = 0, eSheets = 1, eColumns = 2, eOptions = 3, eResult = 4 };
58 DatabaseDialog( View * parent, TQRect
const & rect,
const char * name = 0,
bool modal =
false, WFlags fl = 0 );
59 virtual ~DatabaseDialog();
63 void andBox_clicked();
64 void startingCell_clicked();
65 void startingRegion_clicked();
66 void connectButton_clicked();
67 void databaseNameChanged(
const TQString & s );
68 void databaseHostChanged(
const TQString & s );
69 void databaseDriverChanged(
int );
70 void popupSheetViewMenu( TQListViewItem *,
const TQPoint &,
int );
71 void sheetViewClicked( TQListViewItem * );
78 TQGridLayout * m_databaseLayout;
79 TQGridLayout * m_sheetLayout;
80 TQGridLayout * m_columnsLayout;
81 TQGridLayout * m_optionsLayout;
82 TQGridLayout * m_resultLayout;
88 TQSqlDatabase * m_dbConnection;
90 TQWidget * m_database;
91 TQLabel * m_databasetStatus;
92 TQLineEdit * m_username;
94 TQLineEdit * m_databaseName;
95 TQComboBox * m_driver;
96 TQLineEdit * m_password;
100 TQComboBox * m_databaseList;
101 KPushButton * m_connectButton;
102 TQLabel * m_sheetStatus;
103 TQLabel * m_SelectSheetLabel;
104 TDEListView * m_sheetView;
105 TQWidget * m_columns;
106 TDEListView * m_columnView;
107 TQLabel * m_columnsStatus;
108 TQWidget * m_options;
109 TQComboBox * m_columns_1;
110 TQComboBox * m_columns_2;
111 TQComboBox * m_columns_3;
112 TQComboBox * m_operator_1;
113 TQComboBox * m_operator_2;
114 TQComboBox * m_operator_3;
115 TQLineEdit * m_operatorValue_1;
116 TQLineEdit * m_operatorValue_2;
117 TQLineEdit * m_operatorValue_3;
118 TQRadioButton * m_andBox;
119 TQRadioButton * m_orBox;
120 TQComboBox * m_columnsSort_1;
121 TQComboBox * m_columnsSort_2;
122 TQComboBox * m_sortMode_1;
123 TQComboBox * m_sortMode_2;
124 TQCheckBox * m_distinct;
126 TQTextEdit * m_sqlQuery;
127 TQRadioButton * m_startingRegion;
129 TQLineEdit * m_region;
130 TQRadioButton * m_startingCell;
132 void switchPage(
int id );
133 bool databaseDoNext();
135 bool columnsDoNext();
136 bool optionsDoNext();
138 TQString exchangeWildcards(TQString
const & value);
139 TQString getWhereCondition( TQString
const &, TQString
const &,
int );
The View class displays a KSpread document.