Beispiel #1
0
CSVAtlasWindow *CSVToolWindow::atlasWindow()
{
  if(!_atlasWindow)
  {
    _atlasWindow = new CSVAtlasWindow(this);
    connect(_atlasWindow, SIGNAL(delimiterChanged(QString)), _delim, SLOT(setEditText(QString)));
  }
  return _atlasWindow;
}
Beispiel #2
0
CSVAtlasWindow::CSVAtlasWindow(QWidget *parent) : QMainWindow(parent)
{
    setupUi(this);

    _atlas       = new CSVAtlas();
    _currentDir  = QString::null;
    _filename    = QString::null;
    _msghandler  = new InteractiveMessageHandler(this);
    _selectedMap = QString::null;

    sMapChanged(0);

    MetaSQLHighlighter *tmp = new MetaSQLHighlighter(_preSql);
    tmp = new MetaSQLHighlighter(_postSql);
    connect(_delimiter, SIGNAL(editTextChanged(QString)), this, SIGNAL(delimiterChanged(QString)));
}
void KexiCSVDelimiterWidget::slotDelimiterChangedInternal(int index)
{
    bool changed = false;
    if (index > KEXICSV_OTHER_DELIMITER_INDEX)
        return;
    else if (index == KEXICSV_OTHER_DELIMITER_INDEX) {
        changed = d->delimiter != d->delimiterEdit->text();
        d->delimiter = d->delimiterEdit->text();
    } else {
        changed = d->delimiter != d->availableDelimiters[index];
        d->delimiter = d->availableDelimiters[index];
    }
    d->delimiterEdit->setEnabled(index == KEXICSV_OTHER_DELIMITER_INDEX);
    if (changed)
        emit delimiterChanged(d->delimiter);
}