Ejemplo n.º 1
0
KstChangeFileDialog::KstChangeFileDialog(QWidget* parent,
                                           const char* name,
                                           bool modal,
                                           Qt::WindowFlags fl)
: QDialog(parent, fl) {
  setupUi(this);

  connect(_clearFilter, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(_clearFilter, SIGNAL(clicked()), ChangeFileCurveList, SLOT(clearSelection()));
  connect(_filter, SIGNAL(textChanged(const QString&)), this, SLOT(updateSelection(const QString&)));
  connect(ChangeFileClear, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(ChangeFileClear, SIGNAL(clicked()), ChangeFileCurveList, SLOT(clearSelection()));
  connect(ChangeFileSelectAll, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(ChangeFileSelectAll, SIGNAL(clicked()), this, SLOT(selectAll()));
  connect(ChangeFileApply, SIGNAL(clicked()), this, SLOT(applyFileChange()));
  connect(ChangeFileOK, SIGNAL(clicked()), this, SLOT(OKFileChange()));
  connect(_allFromFile, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(_allFromFile, SIGNAL(clicked()), this, SLOT(allFromFile()));
  connect(_duplicateSelected, SIGNAL(toggled(bool)), _duplicateDependents, SLOT(setEnabled(bool)));
  connect(_dataFile, SIGNAL(textChanged(const QString&)), this, SLOT(sourceChanged(const QString&)));
  connect(_configureSource, SIGNAL(clicked()), this, SLOT(configureSource()));

  _dataFile->completionObject()->setDir(QDir::currentPath());
  _dataFile->setMode(KFile::File | KFile::Directory | KFile::ExistingOnly);

  _clearFilter->setPixmap(BarIcon("locationbar_erase"));
  _duplicateDependents->setEnabled(_duplicateSelected->isChecked());
  _configWidget = 0L;
  _first = true;
}
Ejemplo n.º 2
0
KstChangeFileDialogI::KstChangeFileDialogI(QWidget* parent,
                                           Qt::WindowFlags fl)
: QDialog(parent, fl) {

  setupUi(this);

  connect(_clearFilter, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(_clearFilter, SIGNAL(clicked()), ChangeFileCurveList, SLOT(clearSelection()));
  connect(_filter, SIGNAL(textChanged(const QString&)), this, SLOT(updateSelection(const QString&)));
  connect(ChangeFileCancel, SIGNAL(clicked()), this, SLOT(reject()));
  connect(ChangeFileClear, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(ChangeFileClear, SIGNAL(clicked()), ChangeFileCurveList, SLOT(clearSelection()));
  connect(ChangeFileSelectAll, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(ChangeFileSelectAll, SIGNAL(clicked()), this, SLOT(selectAll()));
  connect(ChangeFileApply, SIGNAL(clicked()), this, SLOT(applyFileChange()));
  connect(ChangeFileOK, SIGNAL(clicked()), this, SLOT(OKFileChange()));
  connect(_allFromFile, SIGNAL(clicked()), _filter, SLOT(clear()));
  connect(_allFromFile, SIGNAL(clicked()), this, SLOT(allFromFile()));
  connect(_duplicateSelected, SIGNAL(toggled(bool)), _duplicateDependents, SLOT(setEnabled(bool)));
  
  _dataFile->completionObject()->setDir(QDir::currentPath());
  _clearFilter->setIcon(BarIcon("locationbar_erase"));
  _duplicateDependents->setEnabled(_duplicateSelected->isChecked());
  _first = true;
}
Ejemplo n.º 3
0
KstChangeFileDialogI::KstChangeFileDialogI(QWidget* parent,
                                           const char* name,
                                           bool modal,
                                           WFlags fl) :
  KstChangeFileDialog(parent, name, modal, fl) {


    connect(ChangeFileClear,     SIGNAL(clicked()),
            ChangeFileCurveList, SLOT(clearSelection()));
    connect(ChangeFileSelectAll, SIGNAL(clicked()),
            this,                SLOT(selectAll()));
    connect(VectorFileBrowse,    SIGNAL(clicked()),
            this,                SLOT(browseFile()));

    connect(ChangeFileApply,     SIGNAL(clicked()),
            this,                SLOT(applyFileChange()));
}
Ejemplo n.º 4
0
void KstChangeFileDialog::OKFileChange() {
  if (applyFileChange()) {
    reject();
  }
}