Kexi API Documentation (2.0 alpha)

KexiCSVExportWizard Class Reference

#include <kexicsvexportwizard.h>

Inheritance diagram for KexiCSVExportWizard:

KWizard List of all members.

Detailed Description

Kexi CSV export wizard Supports exporting to a file and to a clipboard.

Definition at line 42 of file kexicsvexportwizard.h.

Public Member Functions

 KexiCSVExportWizard (const KexiCSVExport::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)
 reimplemented to add "Defaults" button on the left hand
QString defaultDelimiter () const
QString defaultTextQuote () const
bool readBoolEntry (const char *key, bool defaultValue)
 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.
QString readEntry (const char *key, const QString &defaultValue=QString::null)
 Helper like readBoolEntry(const char *, bool), but for QString values.
void writeEntry (const char *key, bool value)
 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.
void writeEntry (const char *key, const QString &value)
 Helper like writeEntry(const char *, bool), but for QString values.
void deleteEntry (const char *key)
 Helper like writeEntry(const char *, bool), but for deleting config entry.

Protected Attributes

KexiCSVExport::Options m_options
KexiMainWindowm_mainWin
KexiStartupFileDialogm_fileSavePage
QWidgetm_exportOptionsPage
KPushButtonm_showOptionsButton
KPushButtonm_defaultsBtn
QGroupBox * m_exportOptionsSection
KexiCSVInfoLabelm_infoLblFrom
KexiCSVInfoLabelm_infoLblTo
KexiCSVDelimiterWidgetm_delimiterWidget
KexiCSVTextQuoteComboBoxm_textQuote
KexiCharacterEncodingComboBoxm_characterEncodingCombo
QCheckBoxm_addColumnNamesCheckBox
QCheckBoxm_alwaysUseCheckBox
KexiDB::TableOrQuerySchemam_tableOrQuery
int m_rowCount
 Cached row count for a table/query.
bool m_rowCountDetermined: 1
bool m_cancelled: 1


Constructor & Destructor Documentation

KexiCSVExportWizard::KexiCSVExportWizard const KexiCSVExport::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 46 of file kexicsvexportwizard.cpp.

References KexiDB::TableOrQuerySchema::captionOrName(), KexiCSVExport::Clipboard, csvMimeTypes(), KexiStartupFileDialog::Custom, defaultDelimiter(), defaultTextQuote(), KexiCSVExport::File, KexiPart::Info::itemIcon(), KexiCSVExport::Options::itemId, m_addColumnNamesCheckBox, m_alwaysUseCheckBox, m_cancelled, m_characterEncodingCombo, m_delimiterWidget, m_exportOptionsPage, m_exportOptionsSection, m_fileSavePage, m_infoLblFrom, m_infoLblTo, m_mainWin, m_options, m_showOptionsButton, m_tableOrQuery, m_textQuote, KexiCSVExport::Options::mode, Kexi::partManager(), KexiMainWindow::project(), KexiDB::TableOrQuerySchema::query(), readBoolEntry(), readEntry(), KexiStartupFileDialog::SavingFileBasedDB, KexiCSVInfoLabel::separator(), KexiStartupFileDialog::setAdditionalFilters(), KexiStartupFileDialog::setDefaultExtension(), KexiCSVDelimiterWidget::setDelimiter(), KexiCSVInfoLabel::setIcon(), KexiStartupFileDialog::setLocationText(), KexiCSVTextQuoteComboBox::setTextQuote(), KexiGUIMessageHandler::showErrorMessage(), slotShowOptionsButtonClicked(), KexiUtils::stringToFileName(), and KexiDB::TableOrQuerySchema::table().

KexiCSVExportWizard::~KexiCSVExportWizard  )  [virtual]
 

Definition at line 231 of file kexicsvexportwizard.cpp.

References m_tableOrQuery.


Member Function Documentation

bool KexiCSVExportWizard::cancelled  )  const
 

Definition at line 236 of file kexicsvexportwizard.cpp.

References m_cancelled.

Referenced by KexiCSVImportExportPart::createWidget().

QString KexiCSVExportWizard::defaultDelimiter  )  const [protected]
 

Returns:
default delimiter depending on mode.

Definition at line 413 of file kexicsvexportwizard.cpp.

References KexiCSVExport::Clipboard, KexiCSVExport::Options::forceDelimiter, KEXICSV_DEFAULT_CLIPBOARD_DELIMITER, KEXICSV_DEFAULT_FILE_DELIMITER, m_options, and KexiCSVExport::Options::mode.

Referenced by done(), KexiCSVExportWizard(), and slotDefaultsButtonClicked().

QString KexiCSVExportWizard::defaultTextQuote  )  const [protected]
 

Returns:
default text quote depending on mode.

Definition at line 424 of file kexicsvexportwizard.cpp.

References KexiCSVExport::Clipboard, KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE, KEXICSV_DEFAULT_FILE_TEXT_QUOTE, m_options, and KexiCSVExport::Options::mode.

Referenced by done(), KexiCSVExportWizard(), and slotDefaultsButtonClicked().

void KexiCSVExportWizard::deleteEntry const char *  key  )  [protected]
 

Helper like writeEntry(const char *, bool), but for deleting config entry.

Definition at line 408 of file kexicsvexportwizard.cpp.

References convertKey(), m_options, and KexiCSVExport::Options::mode.

Referenced by done().

void KexiCSVExportWizard::done int  result  )  [protected, virtual, slot]
 

Definition at line 288 of file kexicsvexportwizard.cpp.

References KexiCSVExport::Options::addColumnNames, KexiCSVExport::Clipboard, defaultDelimiter(), KexiCharacterEncodingComboBox::defaultEncodingSelected(), defaultTextQuote(), deleteEntry(), KexiCSVDelimiterWidget::delimiter(), KexiCSVExport::Options::delimiter, KexiCSVExport::exportData(), KexiCSVExport::Options::fileName, m_addColumnNamesCheckBox, m_alwaysUseCheckBox, m_characterEncodingCombo, m_delimiterWidget, m_exportOptionsSection, m_fileSavePage, m_options, m_tableOrQuery, m_textQuote, KexiCSVExport::Options::mode, KexiCharacterEncodingComboBox::selectedEncoding(), KexiCSVTextQuoteComboBox::textQuote(), KexiCSVExport::Options::textQuote, and writeEntry().

void KexiCSVExportWizard::layOutButtonRow QHBoxLayout *  layout  )  [protected, virtual]
 

reimplemented to add "Defaults" button on the left hand

Definition at line 349 of file kexicsvexportwizard.cpp.

References m_defaultsBtn, m_exportOptionsSection, and slotDefaultsButtonClicked().

void KexiCSVExportWizard::next  )  [protected, virtual, slot]
 

Definition at line 276 of file kexicsvexportwizard.cpp.

References KexiStartupFileDialog::checkFileName(), and m_fileSavePage.

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 388 of file kexicsvexportwizard.cpp.

References convertKey(), m_options, and KexiCSVExport::Options::mode.

Referenced by KexiCSVExportWizard().

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 393 of file kexicsvexportwizard.cpp.

References convertKey(), m_options, and KexiCSVExport::Options::mode.

Referenced by KexiCSVExportWizard().

void KexiCSVExportWizard::showPage QWidget page  )  [virtual]
 

Definition at line 241 of file kexicsvexportwizard.cpp.

References KexiDB::TableOrQuerySchema::captionOrName(), KexiStartupFileDialog::currentFileName(), KexiDB::fieldCount(), KexiCSVExport::File, KexiCSVInfoLabel::fileNameLabel(), m_defaultsBtn, m_exportOptionsPage, m_fileSavePage, m_infoLblFrom, m_infoLblTo, m_options, m_rowCount, m_rowCountDetermined, m_tableOrQuery, KexiCSVExport::Options::mode, KexiDB::rowCount(), KexiCSVInfoLabel::setFileName(), KexiStartupFileDialog::setFocus(), and KexiCSVInfoLabel::setLabelText().

void KexiCSVExportWizard::slotDefaultsButtonClicked  )  [protected, slot]
 

Definition at line 369 of file kexicsvexportwizard.cpp.

References defaultDelimiter(), defaultTextQuote(), m_addColumnNamesCheckBox, m_characterEncodingCombo, m_delimiterWidget, m_textQuote, KexiCharacterEncodingComboBox::selectDefaultEncoding(), KexiCSVDelimiterWidget::setDelimiter(), and KexiCSVTextQuoteComboBox::setTextQuote().

Referenced by layOutButtonRow().

void KexiCSVExportWizard::slotShowOptionsButtonClicked  )  [protected, slot]
 

Definition at line 331 of file kexicsvexportwizard.cpp.

References m_alwaysUseCheckBox, m_defaultsBtn, m_exportOptionsSection, and m_showOptionsButton.

Referenced by KexiCSVExportWizard().

void KexiCSVExportWizard::writeEntry const char *  key,
const QString value
[protected]
 

Helper like writeEntry(const char *, bool), but for QString values.

Definition at line 398 of file kexicsvexportwizard.cpp.

References convertKey(), m_options, and KexiCSVExport::Options::mode.

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 403 of file kexicsvexportwizard.cpp.

References convertKey(), m_options, and KexiCSVExport::Options::mode.

Referenced by done().


Member Data Documentation

QCheckBox* KexiCSVExportWizard::m_addColumnNamesCheckBox [protected]
 

Definition at line 106 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), and slotDefaultsButtonClicked().

QCheckBox * KexiCSVExportWizard::m_alwaysUseCheckBox [protected]
 

Definition at line 106 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), and slotShowOptionsButtonClicked().

bool KexiCSVExportWizard::m_cancelled [protected]
 

Definition at line 110 of file kexicsvexportwizard.h.

Referenced by cancelled(), and KexiCSVExportWizard().

KexiCharacterEncodingComboBox* KexiCSVExportWizard::m_characterEncodingCombo [protected]
 

Definition at line 105 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), and slotDefaultsButtonClicked().

KPushButton* KexiCSVExportWizard::m_defaultsBtn [protected]
 

Definition at line 100 of file kexicsvexportwizard.h.

Referenced by layOutButtonRow(), showPage(), and slotShowOptionsButtonClicked().

KexiCSVDelimiterWidget* KexiCSVExportWizard::m_delimiterWidget [protected]
 

Definition at line 103 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), and slotDefaultsButtonClicked().

QWidget* KexiCSVExportWizard::m_exportOptionsPage [protected]
 

Definition at line 98 of file kexicsvexportwizard.h.

Referenced by KexiCSVExportWizard(), and showPage().

QGroupBox* KexiCSVExportWizard::m_exportOptionsSection [protected]
 

Definition at line 101 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), layOutButtonRow(), and slotShowOptionsButtonClicked().

KexiStartupFileDialog* KexiCSVExportWizard::m_fileSavePage [protected]
 

Definition at line 97 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), next(), and showPage().

KexiCSVInfoLabel* KexiCSVExportWizard::m_infoLblFrom [protected]
 

Definition at line 102 of file kexicsvexportwizard.h.

Referenced by KexiCSVExportWizard(), and showPage().

KexiCSVInfoLabel * KexiCSVExportWizard::m_infoLblTo [protected]
 

Definition at line 102 of file kexicsvexportwizard.h.

Referenced by KexiCSVExportWizard(), and showPage().

KexiMainWindow* KexiCSVExportWizard::m_mainWin [protected]
 

Definition at line 96 of file kexicsvexportwizard.h.

Referenced by KexiCSVExportWizard().

KexiCSVExport::Options KexiCSVExportWizard::m_options [protected]
 

Definition at line 93 of file kexicsvexportwizard.h.

Referenced by defaultDelimiter(), defaultTextQuote(), deleteEntry(), done(), KexiCSVExportWizard(), readBoolEntry(), readEntry(), showPage(), and writeEntry().

int KexiCSVExportWizard::m_rowCount [protected]
 

Cached row count for a table/query.

Definition at line 108 of file kexicsvexportwizard.h.

Referenced by showPage().

bool KexiCSVExportWizard::m_rowCountDetermined [protected]
 

Definition at line 109 of file kexicsvexportwizard.h.

Referenced by showPage().

KPushButton* KexiCSVExportWizard::m_showOptionsButton [protected]
 

Definition at line 99 of file kexicsvexportwizard.h.

Referenced by KexiCSVExportWizard(), and slotShowOptionsButtonClicked().

KexiDB::TableOrQuerySchema* KexiCSVExportWizard::m_tableOrQuery [protected]
 

Definition at line 107 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), showPage(), and ~KexiCSVExportWizard().

KexiCSVTextQuoteComboBox* KexiCSVExportWizard::m_textQuote [protected]
 

Definition at line 104 of file kexicsvexportwizard.h.

Referenced by done(), KexiCSVExportWizard(), and slotDefaultsButtonClicked().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:52 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003