kexi

KexiCSVExportWizard Class Reference

#include <kexicsvexportwizard.h>

List of all members.


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

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
KexiMainWindowm_mainWin
KexiStartupFileDialogm_fileSavePage
QWidget * m_exportOptionsPage
KPushButton * m_showOptionsButton
KPushButton * m_defaultsBtn
QGroupBox * m_exportOptionsSection
KexiCSVInfoLabelm_infoLblFrom
KexiCSVInfoLabelm_infoLblTo
KexiCSVDelimiterWidgetm_delimiterWidget
KexiCSVTextQuoteComboBoxm_textQuote
KexiCharacterEncodingComboBoxm_characterEncodingCombo
QCheckBox * m_addColumnNamesCheckBox
QCheckBox * m_alwaysUseCheckBox
KexiDB::TableOrQuerySchemam_tableOrQuery
int m_rowCount
bool m_rowCountDetermined: 1
bool m_cancelled: 1

Classes

class  Options
 Options used in KexiCSVExportWizard contructor. More...

Member Enumeration Documentation

enum KexiCSVExportWizard::Mode
 

Exporting mode: a file or clipboard.

Definition at line 46 of file kexicsvexportwizard.h.


Constructor & Destructor Documentation

KexiCSVExportWizard::KexiCSVExportWizard const Options options,
KexiMainWindow mainWin,
QWidget *  parent = 0,
const char *  name = 0
 

lineEditOnBottom

Todo:
1.1: for copying use "Always use above options for copying" string

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]
 

Cached row count for a table/query.

Definition at line 121 of file kexicsvexportwizard.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys