kexi
KexiCSVExportWizard Class Reference
#include <kexicsvexportwizard.h>
Detailed Description
Kexi CSV export wizard Supports exporting to a file and to a clipboard.
Definition at line 40 of file kexicsvexportwizard.h.
Public Types | |
Clipboard | |
File | |
enum | Mode { Clipboard, File } |
Public Member Functions | |
KexiCSVExportWizard (const Options &options, KexiMainWindow *mainWin, QWidget *parent=0, const char *name=0) | |
virtual | ~KexiCSVExportWizard () |
bool | cancelled () const |
virtual void | showPage (QWidget *page) |
Protected Slots | |
virtual void | next () |
virtual void | done (int result) |
void | slotShowOptionsButtonClicked () |
void | slotDefaultsButtonClicked () |
Protected Member Functions | |
virtual void | layOutButtonRow (QHBoxLayout *layout) |
bool | exportData () |
QString | defaultDelimiter () const |
QString | defaultTextQuote () const |
bool | readBoolEntry (const char *key, bool defaultValue) |
QString | readEntry (const char *key, const QString &defaultValue=QString::null) |
void | writeEntry (const char *key, bool value) |
void | writeEntry (const char *key, const QString &value) |
void | deleteEntry (const char *key) |
Protected Attributes | |
Options | m_options |
KexiMainWindow * | m_mainWin |
KexiStartupFileDialog * | m_fileSavePage |
QWidget * | m_exportOptionsPage |
KPushButton * | m_showOptionsButton |
KPushButton * | m_defaultsBtn |
QGroupBox * | m_exportOptionsSection |
KexiCSVInfoLabel * | m_infoLblFrom |
KexiCSVInfoLabel * | m_infoLblTo |
KexiCSVDelimiterWidget * | m_delimiterWidget |
KexiCSVTextQuoteComboBox * | m_textQuote |
KexiCharacterEncodingComboBox * | m_characterEncodingCombo |
QCheckBox * | m_addColumnNamesCheckBox |
QCheckBox * | m_alwaysUseCheckBox |
KexiDB::TableOrQuerySchema * | m_tableOrQuery |
int | m_rowCount |
bool | m_rowCountDetermined: 1 |
bool | m_cancelled: 1 |
Classes | |
class | Options |
Options used in KexiCSVExportWizard contructor. More... |
Member Enumeration Documentation
Constructor & Destructor Documentation
KexiCSVExportWizard::KexiCSVExportWizard | ( | const Options & | options, | |
KexiMainWindow * | mainWin, | |||
QWidget * | parent = 0 , |
|||
const char * | name = 0 | |||
) |
Definition at line 54 of file kexicsvexportwizard.cpp.
Member Function Documentation
QString KexiCSVExportWizard::defaultDelimiter | ( | ) | const [protected] |
- Returns:
- default delimiter depending on mode.
Definition at line 566 of file kexicsvexportwizard.cpp.
QString KexiCSVExportWizard::defaultTextQuote | ( | ) | const [protected] |
- Returns:
- default text quote depending on mode.
Definition at line 577 of file kexicsvexportwizard.cpp.
void KexiCSVExportWizard::deleteEntry | ( | const char * | key | ) | [protected] |
Helper like writeEntry(const char *, bool), but for deleting config entry.
Definition at line 561 of file kexicsvexportwizard.cpp.
bool KexiCSVExportWizard::exportData | ( | ) | [protected] |
Exporting, returns false on failure.
- Todo:
- move this to non-GUI location so it can be also used via command line
add a "finish" page with a progressbar.
look at m_rowCount whether the data is really large; if so: avoid copying to clipboard (or ask user) because of system memory
- Todo:
- OPTIMIZATION: use fieldsExpanded(true /*UNIQUE
- Todo:
- (during exporting): enlarge bufSize by factor of 2 when it became too small
- Todo:
- escape strings
Definition at line 380 of file kexicsvexportwizard.cpp.
void KexiCSVExportWizard::layOutButtonRow | ( | QHBoxLayout * | layout | ) | [protected, virtual] |
reimplemented to add "Defaults" button on the left hand
Definition at line 352 of file kexicsvexportwizard.cpp.
bool KexiCSVExportWizard::readBoolEntry | ( | const char * | key, | |
bool | defaultValue | |||
) | [protected] |
Helper, works like kapp->config()->readBoolEntry(const char*, bool) but if mode is Clipboard, "Exporting" is replaced with "Copying" and "Export" is replaced with "Copy" and "CSVFiles" is replaced with "CSVToClipboard" in key, to keep the setting separate.
Definition at line 541 of file kexicsvexportwizard.cpp.
QString KexiCSVExportWizard::readEntry | ( | const char * | key, | |
const QString & | defaultValue = QString::null | |||
) | [protected] |
Helper like readBoolEntry(const char *, bool), but for QString values.
Definition at line 546 of file kexicsvexportwizard.cpp.
void KexiCSVExportWizard::writeEntry | ( | const char * | key, | |
const QString & | value | |||
) | [protected] |
Helper like writeEntry(const char *, bool), but for QString values.
Definition at line 551 of file kexicsvexportwizard.cpp.
void KexiCSVExportWizard::writeEntry | ( | const char * | key, | |
bool | value | |||
) | [protected] |
Helper, works like kapp->config()->writeEntry(const char*,bool) but if mode is Clipboard, "Exporting" is replaced with "Copying" and "Export" is replaced with "Copy" and "CSVFiles" is replaced with "CSVToClipboard" in key, to keep the setting separate.
Definition at line 556 of file kexicsvexportwizard.cpp.
Member Data Documentation
int KexiCSVExportWizard::m_rowCount [protected] |
The documentation for this class was generated from the following files: