Пример #1
0
void ExportDlg::slotSimple(bool toggle)
{
  ASSERT_ENGAUGE(xport != 0);
  if (toggle && (xport->header != HeaderSimple))
  {
    xport->header = HeaderSimple;
    toggleActions();
    updatePreview();
  }
}
Пример #2
0
void ExportDlg::slotGnuplot(bool toggle)
{
  ASSERT_ENGAUGE(xport != 0);
  if (toggle && (xport->header != HeaderGnuplot))
  {
    xport->header = HeaderGnuplot;
    toggleActions();
    updatePreview();
  }
}
Пример #3
0
void ExportDlg::slotOneCurveOnEachLine(bool toggle)
{
  ASSERT_ENGAUGE(xport != 0);
  if (toggle && (xport->layout != OneCurveOnEachLine))
  {
    xport->layout = OneCurveOnEachLine;
    toggleActions();
    updatePreview();
  }
}
Пример #4
0
void ExportDlg::slotTabs(bool toggle)
{
  ASSERT_ENGAUGE(xport != 0);
  if (toggle && (xport->delimiters != Tabs))
  {
    xport->delimiters = Tabs;
    toggleActions();
    updatePreview();
  }
}
Пример #5
0
void ExportDlg::slotXYAllCurves(bool toggle)
{
  ASSERT_ENGAUGE(xport != 0);
  if (toggle && (xport->pointsSelection != XYFromAllCurves))
  {
    xport->pointsSelection = XYFromAllCurves;
    toggleActions();
    updatePreview();
  }
}
Пример #6
0
void ExportDlg::slotXFirstCurve(bool toggle)
{
  ASSERT_ENGAUGE(xport != 0);
  if (toggle && (xport->pointsSelection != XFromFirstCurve))
  {
    xport->pointsSelection = XFromFirstCurve;
    toggleActions();
    updatePreview();
  }
}
Пример #7
0
void ExportDlg::slotExclude()
{
  ASSERT_ENGAUGE(listIncluded != 0);
  QString curve = listIncluded->currentText();
  ASSERT_ENGAUGE(pointSets != 0);
  pointSets->exportExclude(curve);

  resetLists();

  ASSERT_ENGAUGE(listExcluded != 0);
  listExcluded->setCurrentItem(listExcluded->findItem(curve));

  toggleActions();
  updatePreview();
}
Пример #8
0
void ShowFoto::slotDeleteCurrentItem()
{
    QUrl urlCurrent(d->thumbBar->currentUrl());

    QString warnMsg(i18n("About to delete file \"%1\"\nAre you sure?",
                         urlCurrent.fileName()));

    if (QMessageBox::warning(this, qApp->applicationName(), warnMsg, QMessageBox::Apply | QMessageBox::Abort)
        !=  QMessageBox::Apply)
    {
        return;
    }
    else
    {
        bool ret = QFile::remove(urlCurrent.toLocalFile());

        if (!ret)
        {
            QMessageBox::critical(this, qApp->applicationName(), i18n("Cannot delete \"%1\"", urlCurrent.fileName()));
            return;
        }

        // No error, remove item in thumbbar.
        d->model->removeIndex(d->thumbBar->currentIndex());

        // Disable menu actions and SideBar if no current image.

        d->itemsNb = d->thumbBar->showfotoItemInfos().size();

        if (d->itemsNb == 0)
        {
            slotUpdateItemInfo();
            toggleActions(false);
            m_canvas->load(QString(), m_IOFileSettings);
        }
        else
        {
            // If there is an image after the deleted one, make that selected.

            slotOpenUrl(d->thumbBar->currentInfo());
        }
    }
}
Пример #9
0
bool ShowFoto::setup(bool iccSetupPage)
{
    QPointer<Setup> setup = new Setup(this, iccSetupPage ? Setup::ICCPage : Setup::LastPageUsed);

    if (setup->exec() != QDialog::Accepted)
    {
        delete setup;
        return false;
    }

    KSharedConfig::openConfig()->sync();

    applySettings();

    if (d->itemsNb == 0)
    {
        slotUpdateItemInfo();
        toggleActions(false);
    }

    delete setup;
    return true;
}
Пример #10
0
PointSetDlg::PointSetDlg(QString title, QString pointsetName,
  DigitizeState state, PointSetStyle* pointSetStyle) :
  QDialog(0, "pointsetdlg", true),
  state(state),
  pointSetStyle(pointSetStyle)
{
  DigitDebug::ctor(QString("pointsetdlg ") + QString::number((ulong) this, 16));
  
  setCaption(curveReplace("Curve Properties - [%1%2]%3")
    .arg(title)
    .arg(pointsetNameFilter(pointsetName))
    .arg(freewareCaption));
    
  setFixedSize(340, 520);

  // point area
  groupPoint = new Q3GroupBox(QString(tr("Point")), this);
  CHECK_PTR_ENGAUGE(groupPoint);
  groupPoint->setGeometry(10, 10, 320, 220);
  
  labelShape = new QLabel(QString(tr("Shape:")), this);
  CHECK_PTR_ENGAUGE(labelShape);
  labelShape->setGeometry(20, 30, 120, 30);

  comboShape = new QComboBox(false, this, tr("Shape"));
  CHECK_PTR_ENGAUGE(comboShape);
  comboShape->setGeometry(145, 30, 175, 30);
  comboShape->setEditable(false);
  comboShape->insertStringList(PointSetStyles::instance().pointShapeNames());
  QWhatsThis::add(comboShape, QString(tr("Select a shape for the points")));
  connect(comboShape, SIGNAL(activated(const QString &)), this, SLOT(slotPointShape(const QString &)));
  
  labelShapeSize = new QLabel(QString(tr("Size:")), this);
  CHECK_PTR_ENGAUGE(labelShapeSize);
  labelShapeSize->setGeometry(20, 70, 120, 30);

  comboShapeSize = new QComboBox(false, this, tr("Shape Size"));
  CHECK_PTR_ENGAUGE(comboShapeSize);
  comboShapeSize->setGeometry(145, 70, 175, 30);
  comboShapeSize->setEditable(false);
  comboShapeSize->insertStringList(PointSetStyles::instance().pointSizeNames());
  QWhatsThis::add(comboShapeSize, QString(tr("Select an overall size for the points")));
  connect(comboShapeSize, SIGNAL(activated(const QString &)), this, SLOT(slotPointSize(const QString &)));

  labelShapeLineSize = new QLabel(QString(tr("Line Size:")), this);
  CHECK_PTR_ENGAUGE(labelShapeLineSize);
  labelShapeLineSize->setGeometry(20, 110, 120, 30);

  comboShapeLineSize = new QComboBox(false, this, tr("Shape Line Size"));
  CHECK_PTR_ENGAUGE(comboShapeLineSize);
  comboShapeLineSize->setGeometry(145, 110, 175, 30);
  comboShapeLineSize->setEditable(false);
  comboShapeLineSize->insertStringList(PointSetStyles::instance().pointLineSizeNames());
  QWhatsThis::add(comboShapeLineSize, QString(tr("Select a size for the line used to draw the point shapes")));
  connect(comboShapeLineSize, SIGNAL(activated(const QString &)), this, SLOT(slotPointLineSize(const QString &)));

  labelShapeLineColor = new QLabel(QString(tr("Line Color:")), this);
  CHECK_PTR_ENGAUGE(labelShapeLineColor);
  labelShapeLineColor->setGeometry(20, 150, 120, 30);

  comboShapeLineColor = new QComboBox(false, this, tr("Shape Line Color"));
  CHECK_PTR_ENGAUGE(comboShapeLineColor);
  comboShapeLineColor->setGeometry(145, 150, 175, 30);
  comboShapeLineColor->setEditable(false);
  comboShapeLineColor->insertStringList(PointSetStyles::instance().colorNames());
  QWhatsThis::add(comboShapeLineColor, QString(tr("Select a color for the line used to draw the point shapes")));
  connect(comboShapeLineColor, SIGNAL(activated(const QString &)), this, SLOT(slotPointLineColor(const QString &)));
  
  labelShapeInColor = new QLabel(QString(tr("Interior Color:")), this);
  CHECK_PTR_ENGAUGE(labelShapeInColor);
  labelShapeInColor->setGeometry(20, 190, 120, 30);

  comboShapeInColor = new QComboBox(false, this, tr("Shape Interior Color"));
  CHECK_PTR_ENGAUGE(comboShapeInColor);
  comboShapeInColor->setGeometry(145, 190, 175, 30);
  comboShapeInColor->setEditable(false);
  comboShapeInColor->insertStringList(PointSetStyles::instance().colorNames());
  QWhatsThis::add(comboShapeInColor, QString(tr("Select a color for the interior of the point shapes.\n\n"
    "This has no effect on points without interiors")));
  connect(comboShapeInColor, SIGNAL(activated(const QString &)), this, SLOT(slotPointInColor(const QString &)));

  // line area
  groupLine = new Q3GroupBox(QString(tr("Line")), this);
  CHECK_PTR_ENGAUGE(groupLine);
  groupLine->setGeometry(10, 240, 320, 140);

  labelLineSize = new QLabel(QString(tr("Size:")), this);
  CHECK_PTR_ENGAUGE(labelLineSize);
  labelLineSize->setGeometry(20, 260, 120, 30);

  comboLineSize = new QComboBox(false, this, tr("Line Size"));
  CHECK_PTR_ENGAUGE(comboLineSize);
  comboLineSize->setGeometry(145, 260, 175, 30);
  comboLineSize->setEditable(false);
  comboLineSize->insertStringList(PointSetStyles::instance().lineSizeNames());
  QWhatsThis::add(comboLineSize, QString(tr("Select a size for the lines drawn between points")));
  connect(comboLineSize, SIGNAL(activated(const QString &)), this, SLOT(slotLineSize(const QString &)));

  labelLineColor = new QLabel(QString(tr("Color:")), this);
  CHECK_PTR_ENGAUGE(labelLineColor);
  labelLineColor->setGeometry(20, 300, 120, 30);

  comboLineColor = new QComboBox(false, this, tr("Line Color"));
  CHECK_PTR_ENGAUGE(comboLineColor);
  comboLineColor->setGeometry(145, 300, 175, 30);
  comboLineColor->setEditable(false);
  comboLineColor->insertStringList(PointSetStyles::instance().colorNames());
  QWhatsThis::add(comboLineColor, QString(tr("Select a color for the lines drawn between points")));
  connect(comboLineColor, SIGNAL(activated(const QString &)), this, SLOT(slotLineColor(const QString &)));

  labelLineConnectAs = new QLabel(QString(tr("Connect As:")), this);
  CHECK_PTR_ENGAUGE(labelLineConnectAs);
  labelLineConnectAs->setGeometry(20, 340, 120, 30);

  comboLineConnectAs = new QComboBox(false, this, tr("Connect As"));
  CHECK_PTR_ENGAUGE(comboLineConnectAs);
  comboLineConnectAs->setGeometry(145, 340, 175, 30);
  comboLineConnectAs->setEditable(false);
  if (state != CurveState)               
    comboLineConnectAs->setEnabled(false); // can only change Connect As method of curves
  comboLineConnectAs->insertStringList(PointSetStyles::instance().lineConnectAsNames());
  QWhatsThis::add(comboLineConnectAs, QString(tr("Select rule for connecting points with lines.\n\n"
    "If the curve is connected as a single-valued function then the points are ordered by "
    "increasing value of the independent variable.\n\n"
    "If the curve is connected as a closed contour, then the points are ordered by age, except for "
    "points placed along an existing line. Any point placed on top of any existing line is inserted "
    "between the two endpoints of that line - as if its age was between the ages of the two "
    "endpoints.\n\n"
    "Lines are drawn between successively ordered points")));
  connect(comboLineConnectAs, SIGNAL(activated(const QString &)), this, SLOT(slotLineConnectAs(const QString &)));

  // preview area
  labelPreview = new QLabel(QString(tr("Preview")), this);
  CHECK_PTR_ENGAUGE(labelPreview);
  labelPreview->setGeometry(10, 390, 115, 20);

  previewCanvas = new Q3Canvas(this);
  CHECK_PTR_ENGAUGE(previewCanvas);
  previewCanvas->resize(360, 50);

  previewCanvasView = new Q3CanvasView(previewCanvas, this);
  CHECK_PTR_ENGAUGE(previewCanvasView);
  previewCanvasView->setGeometry(10, 420, 320, 50);
  previewCanvasView->setHScrollBarMode(Q3ScrollView::AlwaysOff);
  previewCanvasView->setVScrollBarMode(Q3ScrollView::AlwaysOff);
  QWhatsThis::add(previewCanvasView, QString(tr(
    "Preview window shows how current settings affect the lines and points")));

  pointSet = new PointSet;
  CHECK_PTR_ENGAUGE(pointSet);
  pointSet->setStyle(*pointSetStyle);

  previewLeftPoint = new Point(40, 25, previewCanvas);
  CHECK_PTR_ENGAUGE(previewLeftPoint);
  previewRightPoint = new Point(250, 25, previewCanvas);
  CHECK_PTR_ENGAUGE(previewRightPoint);
  QList<QRect> updateRectList;
  pointSet->addPoint(previewCanvas, previewLeftPoint, &updateRectList);
  pointSet->addPoint(previewCanvas, previewRightPoint, &updateRectList);
  previewLeftPoint->setPointSet(pointSet);
  previewRightPoint->setPointSet(pointSet);

  // navigation buttons
  buttonOk = new QPushButton(tr("OK"), this);
  CHECK_PTR_ENGAUGE(buttonOk);
  buttonOk->setGeometry(10, 480, 100, 30);
  connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept()));

  buttonCancel = new QPushButton(tr("Cancel"), this);
  CHECK_PTR_ENGAUGE(buttonCancel);
  buttonCancel->setGeometry(140, 480, 100, 30);
  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));

  buttonWhat = new QPushButton(this);
  CHECK_PTR_ENGAUGE(buttonWhat);
  buttonWhat->setPixmap(QPixmap(whatsthis_xpm));
  buttonWhat->setGeometry(270, 480, 60, 30);
  QToolTip::add(buttonWhat, QString("What's this?"));
  connect(buttonWhat, SIGNAL(clicked()), this, SLOT(slotWhat()));

  toggleActions();
  updatePreview();
}
Пример #11
0
void ExportDlg::slotExcluded(Q3ListBoxItem*)
{
  toggleActions();
}
Пример #12
0
ExportDlg::ExportDlg(QString title, PointSets* pointSets, const CoordSettings* coord,
  const GridMeshSettings* grid, ExportSettings* xport) :
  QDialog(0, "exportdlg", true),
  pointSets(pointSets),
  coord(coord),
  grid(grid),
  xport(xport)
{
  DigitDebug::ctor(QString("exportdlg ") + QString::number((ulong) this, 16));
  
  setCaption(tr("Export Settings - [%1]%2")
    .arg(title)
    .arg(freewareCaption));

  setFixedSize(380, 650);

  // curve selection
  groupCurveSelection = new Q3GroupBox(QString(tr("Curve Selection")), this);
  CHECK_PTR_ENGAUGE(groupCurveSelection);
  groupCurveSelection->setGeometry(10, 10, 360, 150);
  
  labelIncluded = new QLabel(QString(tr("Included")), groupCurveSelection);
  CHECK_PTR_ENGAUGE(labelIncluded);
  labelIncluded->setGeometry(10, 20, 110, 20);

  labelExcluded = new QLabel(QString(tr("Not included")), groupCurveSelection);
  CHECK_PTR_ENGAUGE(labelExcluded);
  labelExcluded->setGeometry(240, 20, 110, 20);
  
  listIncluded = new Q3ListBox(groupCurveSelection);
  CHECK_PTR_ENGAUGE(listIncluded);
  listIncluded->setGeometry(10, 40, 110, 100);
  QWhatsThis::add(listIncluded, QString(tr("List of curves to be included in the exported file")));
  connect(listIncluded, SIGNAL(selectionChanged(Q3ListBoxItem*)), this, SLOT(slotIncluded(Q3ListBoxItem*)));
  
  listExcluded = new Q3ListBox(groupCurveSelection);
  CHECK_PTR_ENGAUGE(listExcluded);
  listExcluded->setGeometry(240, 40, 110, 100);
  QWhatsThis::add(listExcluded, QString(tr("List of curves to be excluded from the exported file")));
  connect(listExcluded, SIGNAL(selectionChanged(Q3ListBoxItem*)), this, SLOT(slotExcluded(Q3ListBoxItem*)));
  
  buttonInclude = new QPushButton(QString(tr("<<Include")), groupCurveSelection);
  CHECK_PTR_ENGAUGE(buttonInclude);
  buttonInclude->setGeometry(130, 40, 100, 30);
  QWhatsThis::add(buttonInclude, QString(tr("Move the currently selected curve from the excluded list "
    "to the included list")));
  connect(buttonInclude, SIGNAL(clicked()), this, SLOT(slotInclude()));
  
  buttonExclude = new QPushButton(QString(tr("Exclude>>")), groupCurveSelection);
  CHECK_PTR_ENGAUGE(buttonExclude);
  buttonExclude->setGeometry(130, 80, 100, 30);
  QWhatsThis::add(buttonExclude, QString(tr("Move the currently selected curve from the included list "
    "to the excluded list")));
  connect(buttonExclude, SIGNAL(clicked()), this, SLOT(slotExclude()));
  
  // points selection
  groupPointsSelection = new Q3ButtonGroup(QString(tr("Points Selection")), this);
  CHECK_PTR_ENGAUGE(groupPointsSelection);
  groupPointsSelection->setGeometry(10, 170, 360, 110);

  buttonXAllCurves = new QRadioButton(QString(tr("Interpolate Y's at X's from all curves")),
    groupPointsSelection);
  CHECK_PTR_ENGAUGE(buttonXAllCurves);
  buttonXAllCurves->setGeometry(10, 20, 300, 20);
  QWhatsThis::add(buttonXAllCurves, QString(tr("Exported file will have values at every unique X "
    "value from every curve. Y values will be linearly interpolated if necessary")));
  connect(buttonXAllCurves, SIGNAL(toggled(bool)), this, SLOT(slotXAllCurves(bool)));

  buttonXFirstCurve = new QRadioButton(QString(tr("Interpolate Y's at X's from first curve")),
    groupPointsSelection);
  CHECK_PTR_ENGAUGE(buttonXFirstCurve);
  buttonXFirstCurve->setGeometry(10, 40, 300, 20);
  QWhatsThis::add(buttonXFirstCurve, QString(tr("Exported file will have values at every unique X "
    "value from the first curve. Y values will be linearly interpolated if necessary")));
  connect(buttonXFirstCurve, SIGNAL(toggled(bool)), this, SLOT(slotXFirstCurve(bool)));

  buttonXGridLines = new QRadioButton(QString(tr("Interpolate Y's at grid line X's")), groupPointsSelection);
  CHECK_PTR_ENGAUGE(buttonXGridLines);
  buttonXGridLines->setGeometry(10, 60, 300, 20);
  QWhatsThis::add(buttonXGridLines, QString(tr("Exported file will have values at every unique X "
    "grid line. Y values will be linearly interpolated if necessary")));
  connect(buttonXGridLines, SIGNAL(toggled(bool)), this, SLOT(slotXGridLines(bool)));

  buttonXYAllCurves = new QRadioButton(QString(tr("Raw X's and Y's")), groupPointsSelection);
  CHECK_PTR_ENGAUGE(buttonXYAllCurves);
  buttonXYAllCurves->setGeometry(10, 80, 300, 20);
  QWhatsThis::add(buttonXYAllCurves, QString(tr("Exported file will have only original X and Y values "
    "without any interpolation")));
  connect(buttonXYAllCurves, SIGNAL(toggled(bool)), this, SLOT(slotXYAllCurves(bool)));

  // layout
  groupLayout = new Q3ButtonGroup(QString(tr("Layout")), this);
  CHECK_PTR_ENGAUGE(groupLayout);
  groupLayout->setGeometry(10, 290, 360, 70);

  buttonAllCurvesOnEachLine = new QRadioButton(QString(tr("All curves on each line")), groupLayout);
  CHECK_PTR_ENGAUGE(buttonAllCurvesOnEachLine);
  buttonAllCurvesOnEachLine->setGeometry(10, 20, 210, 20);
  QWhatsThis::add(buttonAllCurvesOnEachLine, QString(tr("Exported file will have, on each line, "
    "an X value, the Y value for the first curve, the Y value for the second curve,...")));
  connect(buttonAllCurvesOnEachLine, SIGNAL(toggled(bool)), this, SLOT(slotAllCurvesOnEachLine(bool)));

  buttonOneCurveOnEachLine = new QRadioButton(QString(tr("One curve on each line")), groupLayout);
  CHECK_PTR_ENGAUGE(buttonOneCurveOnEachLine);
  buttonOneCurveOnEachLine->setGeometry(10, 40, 210, 20);
  QWhatsThis::add(buttonOneCurveOnEachLine, QString(tr("Exported file will have all the points for "
    "the first curve, with one X-Y pair on each line, then the points for the second curve,...")));
  connect(buttonOneCurveOnEachLine, SIGNAL(toggled(bool)), this, SLOT(slotOneCurveOnEachLine(bool)));

  // delimiters
  groupDelimiters = new Q3ButtonGroup(QString(tr("Delimiters")), this);
  CHECK_PTR_ENGAUGE(groupDelimiters);
  groupDelimiters->setGeometry(10, 370, 113, 90);

  buttonCommas = new QRadioButton(QString(tr("Commas")), groupDelimiters);
  CHECK_PTR_ENGAUGE(buttonCommas);
  buttonCommas->setGeometry(10, 20, 110, 20);
  QWhatsThis::add(buttonCommas, QString(tr("Exported file will have commas between adjacent values")));
  connect(buttonCommas, SIGNAL(toggled(bool)), this, SLOT(slotCommas(bool)));

  buttonSpaces = new QRadioButton(QString(tr("Spaces")), groupDelimiters);
  CHECK_PTR_ENGAUGE(buttonSpaces);
  buttonSpaces->setGeometry(10, 40, 110, 20);
  QWhatsThis::add(buttonSpaces, QString(tr("Exported file will have spaces between adjacent values")));
  connect(buttonSpaces, SIGNAL(toggled(bool)), this, SLOT(slotSpaces(bool)));

  buttonTabs = new QRadioButton(QString(tr("Tabs")), groupDelimiters);
  CHECK_PTR_ENGAUGE(buttonTabs);
  buttonTabs->setGeometry(10, 60, 110, 20);
  QWhatsThis::add(buttonTabs, QString(tr("Exported file will have tabs between adjacent values")));
  connect(buttonTabs, SIGNAL(toggled(bool)), this, SLOT(slotTabs(bool)));

  // header
  groupHeader = new Q3ButtonGroup(QString(tr("Header")), this);
  CHECK_PTR_ENGAUGE(groupHeader);
  groupHeader->setGeometry(133, 370, 113, 90);

  buttonNone = new QRadioButton(QString(tr("None")), groupHeader);
  CHECK_PTR_ENGAUGE(buttonNone);
  buttonNone->setGeometry(10, 20, 110, 20);
  QWhatsThis::add(buttonNone, QString(tr("Exported file will have no header line")));
  connect(buttonNone, SIGNAL(toggled(bool)), this, SLOT(slotNone(bool)));

  buttonSimple = new QRadioButton(QString(tr("Simple")), groupHeader);
  CHECK_PTR_ENGAUGE(buttonSimple);
  buttonSimple->setGeometry(10, 40, 110, 20);
  QWhatsThis::add(buttonSimple, QString(tr("Exported file will have simple header line")));
  connect(buttonSimple, SIGNAL(toggled(bool)), this, SLOT(slotSimple(bool)));

  buttonGnuplot = new QRadioButton(QString(tr("Gnuplot")), groupHeader);
  CHECK_PTR_ENGAUGE(buttonGnuplot);
  buttonGnuplot->setGeometry(10, 60, 110, 20);
  QWhatsThis::add(buttonGnuplot, QString(tr("Exported file will have gnuplot header line")));
  connect(buttonGnuplot, SIGNAL(toggled(bool)), this, SLOT(slotGnuplot(bool)));

  // x label for header
  if (coord->frame == Cartesian)
    labelXThetaLabel = new QLabel(QString(tr("Header X Label")), this);
  else
    labelXThetaLabel = new QLabel(QString(tr("Header Theta Label")), this);
  CHECK_PTR_ENGAUGE(labelXThetaLabel);
  labelXThetaLabel->setGeometry(256, 390, 114, 20);

  editXThetaLabel = new QLineEdit(this);
  CHECK_PTR_ENGAUGE(editXThetaLabel);
  editXThetaLabel->setGeometry(256, 410, 110, 20);
  if (coord->frame == Cartesian)
    QWhatsThis::add(editXThetaLabel, QString(tr("Label in the header for x values")));
  else
    QWhatsThis::add(editXThetaLabel, QString(tr("Label in the header for theta values")));
  connect(editXThetaLabel, SIGNAL(textEdited(const QString&)), this, SLOT(slotXThetaLabel(const QString&)));

  // preview
  labelPreview = new QLabel(QString(tr("Preview")), this);
  CHECK_PTR_ENGAUGE(labelPreview);
  labelPreview->setGeometry(10, 470, 100, 20);

  listPreview = new Q3ListBox(this);
  CHECK_PTR_ENGAUGE(listPreview);
  listPreview->setGeometry(10, 490, 360, 110);
  QWhatsThis::add(listPreview, QString(tr("Preview window shows how current settings affect the exported file")));

  // navigation buttons
  buttonOk = new QPushButton(tr("OK"), this);
  CHECK_PTR_ENGAUGE(buttonOk);
  buttonOk->setGeometry(45, 610, 100, 30);
  connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept()));

  buttonCancel = new QPushButton(tr("Cancel"), this);
  CHECK_PTR_ENGAUGE(buttonCancel);
  buttonCancel->setGeometry(175, 610, 100, 30);
  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));

  buttonWhat = new QPushButton(this);
  CHECK_PTR_ENGAUGE(buttonWhat);
  buttonWhat->setPixmap(QPixmap(whatsthis_xpm));
  buttonWhat->setGeometry(305, 610, 60, 30);
  QToolTip::add(buttonWhat, QString(tr("What's this?")));
  connect(buttonWhat, SIGNAL(clicked()), this, SLOT(slotWhat()));

  resetLists();    
  toggleActions();
  updatePreview();
}