Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Private Attributes
CsvDialog Class Reference

#include <csvdia.h>

List of all members.

Public Member Functions

 CsvDialog ()
 ~CsvDialog ()
QString getFDelim ()
QString getVDelim ()
bool hasHeader ()
bool useVDelim ()

Private Attributes

QComboBox * fdelimCombo
QComboBox * vdelimCombo
QCheckBox * headerCheck
QPushButton * okButton
QPushButton * cancelButton

Detailed Description

Definition at line 19 of file csvdia.h.


Constructor & Destructor Documentation

Definition at line 14 of file csvdia.cpp.

                     : QDialog(0, "csvdia", true, 0)
{
       setCaption( tr("CSV Importer Options"));
       setIcon(loadIcon("AppIcon.png"));

       QBoxLayout* layout = new QVBoxLayout(this);

       QBoxLayout* flayout = new QHBoxLayout(0, 5, 5, "flayout");
       QLabel* fdlabel = new QLabel( tr("Field delimiter:"), this, "fdlabel", 0);
       fdlabel->setMinimumWidth(120);
       flayout->addWidget(fdlabel,1);
       fdelimCombo = new QComboBox(true, this, "fdelimCombo");
       QStringList fdList(",");
       fdList << ";";
       fdList << tr("(TAB)");
       fdelimCombo->insertStringList(fdList);
       fdelimCombo->setMinimumWidth(120);
       flayout->addWidget(fdelimCombo,5);
       layout->addLayout(flayout);

       QBoxLayout* vlayout = new QHBoxLayout(0, 5, 5, "vlayout");
       QLabel* vdlabel = new QLabel( tr("Value delimiter:"), this, "fdlabel", 0);
       vdlabel->setMinimumWidth(120);
       vlayout->addWidget(vdlabel,1);
       vdelimCombo = new QComboBox(true, this, "vdelimCombo");
       QStringList vdList("\"");
       vdList << "'" << tr("None", "delimiter");
       vdelimCombo->insertStringList(vdList);
       vdelimCombo->setMinimumWidth(120);
       vlayout->addWidget(vdelimCombo,5);
       layout->addLayout(vlayout);

       QBoxLayout* hlayout = new QHBoxLayout(0, 5, 5, "hlayout");
       headerCheck = new QCheckBox( tr("First row is a header"), this, "headerCheck");
       hlayout->addWidget(headerCheck);
       layout->addLayout(hlayout);

       QBoxLayout* blayout = new QHBoxLayout(0, 5, 5, "blayout");
       blayout->addStretch(10);
       okButton = new QPushButton( tr("OK"), this, "okButton");
       blayout->addWidget(okButton);

       cancelButton = new QPushButton( tr("Cancel"), this, "cancelButton");
       blayout->addWidget(cancelButton);
       layout->addLayout(blayout);

       connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
       connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
}

Here is the call graph for this function:

Definition at line 86 of file csvdia.cpp.

{

}

Member Function Documentation

QString CsvDialog::getFDelim ( )

Definition at line 64 of file csvdia.cpp.

{
       if (fdelimCombo->currentText() == tr("(TAB)"))
              return "\t";
       return fdelimCombo->currentText();
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString CsvDialog::getVDelim ( )

Definition at line 71 of file csvdia.cpp.

{
       return vdelimCombo->currentText();
}

Here is the caller graph for this function:

Definition at line 76 of file csvdia.cpp.

{
       return headerCheck->isChecked();
}

Here is the caller graph for this function:

Definition at line 81 of file csvdia.cpp.

{
       return vdelimCombo->currentItem() != 2;
}

Here is the caller graph for this function:


Member Data Documentation

QPushButton* CsvDialog::cancelButton [private]

Definition at line 36 of file csvdia.h.

QComboBox* CsvDialog::fdelimCombo [private]

Definition at line 32 of file csvdia.h.

QCheckBox* CsvDialog::headerCheck [private]

Definition at line 34 of file csvdia.h.

QPushButton* CsvDialog::okButton [private]

Definition at line 35 of file csvdia.h.

QComboBox* CsvDialog::vdelimCombo [private]

Definition at line 33 of file csvdia.h.


The documentation for this class was generated from the following files: