kexi

kexicsvexportwizard.h
1/* This file is part of the KDE project
2 Copyright (C) 2005,2006 Jaroslaw Staniek <js@iidea.pl>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KEXI_CSVEXPORTWIZARD_H
21#define KEXI_CSVEXPORTWIZARD_H
22
23#include <kwizard.h>
24
25#include "kexicsvexport.h"
26
27class TQCheckBox;
28class TQGroupBox;
29class KPushButton;
30class KexiMainWindow;
36namespace KexiDB {
38}
39
42class KexiCSVExportWizard : public KWizard
43{
44 TQ_OBJECT
45
46
47 public:
49 TQWidget * parent = 0, const char * name = 0 );
50
51 virtual ~KexiCSVExportWizard();
52
53 bool cancelled() const;
54
55 virtual void showPage ( TQWidget * page );
56
57 protected slots:
58 virtual void next();
59 virtual void done(int result);
60 void slotShowOptionsButtonClicked();
61 void slotDefaultsButtonClicked();
62
63 protected:
65 virtual void layOutButtonRow( TQHBoxLayout * layout );
66
68 TQString defaultDelimiter() const;
69
71 TQString defaultTextQuote() const;
72
77 bool readBoolEntry(const char *key, bool defaultValue);
78
80 TQString readEntry(const char *key, const TQString& defaultValue = TQString());
81
86 void writeEntry(const char *key, bool value);
87
89 void writeEntry(const char *key, const TQString& value);
90
92 void deleteEntry(const char *key);
93
94 KexiCSVExport::Options m_options;
95// Mode m_mode;
96// int m_itemId;
97 KexiMainWindow* m_mainWin;
98 KexiStartupFileDialog* m_fileSavePage;
99 TQWidget* m_exportOptionsPage;
100 KPushButton *m_showOptionsButton;
101 KPushButton *m_defaultsBtn;
102 TQGroupBox* m_exportOptionsSection;
103 KexiCSVInfoLabel *m_infoLblFrom, *m_infoLblTo;
104 KexiCSVDelimiterWidget* m_delimiterWidget;
105 KexiCSVTextQuoteComboBox* m_textQuote;
106 KexiCharacterEncodingComboBox *m_characterEncodingCombo;
107 TQCheckBox* m_addColumnNamesCheckBox, *m_alwaysUseCheckBox;
108 KexiDB::TableOrQuerySchema* m_tableOrQuery;
110 bool m_rowCountDetermined : 1;
111 bool m_cancelled : 1;
112};
113
114#endif
A combo box widget providing a list of possible delimiters Used by CSV import and export dialogs.
KexiCSVExportWizard(const KexiCSVExport::Options &options, KexiMainWindow *mainWin, TQWidget *parent=0, const char *name=0)
TQString readEntry(const char *key, const TQString &defaultValue=TQString())
Helper like readBoolEntry(const char *, bool), but for TQString values.
void deleteEntry(const char *key)
Helper like writeEntry(const char *, bool), but for deleting config entry.
virtual void layOutButtonRow(TQHBoxLayout *layout)
reimplemented to add "Defaults" button on the left hand
int m_rowCount
Cached row count for a table/query.
TQString defaultDelimiter() const
void writeEntry(const char *key, bool value)
bool readBoolEntry(const char *key, bool defaultValue)
TQString defaultTextQuote() const
Options used in KexiCSVExportWizard contructor.
A helper widget showing a short text information with an icon. See ctor for details....
A combo box widget providing a list of possible quote characters Used by CSV import and export dialog...
Combobox widget providing a list of possible character encodings.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
Widget for opening/saving files supported by Kexi.
High-level database connectivity library with database backend drivers.