00001
00002
00003
00004
00005
00006
00007 #ifndef DLG_SETTINGS_EXPORT_FORMAT_H
00008 #define DLG_SETTINGS_EXPORT_FORMAT_H
00009
00010 #include "DlgSettingsAbstractBase.h"
00011
00012 class DocumentModelExportFormat;
00013 class QCheckBox;
00014 class QComboBox;
00015 class QDoubleValidator;
00016 class QGridLayout;
00017 class QHBoxLayout;
00018 class QLineEdit;
00019 class QLabel;
00020 class QListWidget;
00021 class QPushButton;
00022 class QRadioButton;
00023 class QTabWidget;
00024 class QTextEdit;
00025 class QVBoxLayout;
00026
00028 class DlgSettingsExportFormat : public DlgSettingsAbstractBase
00029 {
00030 Q_OBJECT;
00031
00032 public:
00034 DlgSettingsExportFormat(MainWindow &mainWindow);
00035 virtual ~DlgSettingsExportFormat();
00036
00037 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
00038 virtual QWidget *createSubPanel ();
00039 virtual void load (CmdMediator &cmdMediator);
00040 virtual void setSmallDialogs (bool smallDialogs);
00041
00042 private slots:
00043 void slotDelimitersCommas();
00044 void slotDelimitersSemicolons();
00045 void slotDelimitersSpaces();
00046 void slotDelimitersTabs();
00047 void slotExclude();
00048 void slotFunctionsLayoutAllCurves();
00049 void slotFunctionsLayoutOneCurve();
00050 void slotFunctionsPointsAllCurves();
00051 void slotFunctionsPointsEvenlySpaced();
00052 void slotFunctionsPointsEvenlySpacedInterval(const QString &);
00053 void slotFunctionsPointsEvenlySpacedIntervalUnits(const QString &);
00054 void slotFunctionsPointsFirstCurve();
00055 void slotFunctionsPointsRaw();
00056 void slotHeaderGnuplot();
00057 void slotHeaderNone();
00058 void slotHeaderSimple();
00059 void slotInclude();
00060 void slotListExcluded();
00061 void slotListIncluded();
00062 void slotOverrideCsvTsv(int);
00063 void slotRelationsPointsEvenlySpaced();
00064 void slotRelationsPointsEvenlySpacedInterval(const QString &);
00065 void slotRelationsPointsEvenlySpacedIntervalUnits(const QString &);
00066 void slotRelationsPointsRaw();
00067 void slotSaveDefault();
00068 void slotTabChanged (int);
00069 void slotXLabel (const QString &);
00070
00071 protected:
00072 virtual void handleOk ();
00073
00074 private:
00075
00076 void createCurveSelection (QGridLayout *layout, int &row);
00077 void createDelimiters (QHBoxLayout *layoutMisc);
00078 void createFileLayout (QHBoxLayout *layoutMisc);
00079 void createFunctionsPointsSelection (QHBoxLayout *layout);
00080 void createHeader (QHBoxLayout *layoutMisc);
00081 void createPreview (QGridLayout *layout, int &row);
00082 void createRelationsPointsSelection (QHBoxLayout *layout);
00083 void createTabWidget (QGridLayout *layout,
00084 int &row);
00085 void createXLabel (QGridLayout *layoutHeader,
00086 int colLabel);
00087 QString exportedTextToExportedHtml (const QString &text,
00088 const QString &color) const;
00089 bool goodIntervalFunctions() const;
00090 bool goodIntervalRelations() const;
00091 void initializeIntervalConstraints ();
00092 void updateControls();
00093 void updateControlsUponLoad();
00094 void updateIntervalConstraints();
00095 void updatePreview();
00096
00097 QTabWidget *m_tabWidget;
00098
00099 QListWidget *m_listIncluded;
00100 QListWidget *m_listExcluded;
00101
00102 QPushButton *m_btnInclude;
00103 QPushButton *m_btnExclude;
00104
00105 QRadioButton *m_btnFunctionsPointsAllCurves;
00106 QRadioButton *m_btnFunctionsPointsFirstCurve;
00107 QRadioButton *m_btnFunctionsPointsEvenlySpaced;
00108 QLineEdit *m_editFunctionsPointsEvenlySpacing;
00109 QDoubleValidator *m_validatorFunctionsPointsEvenlySpacing;
00110 QComboBox *m_cmbFunctionsPointsEvenlySpacingUnits;
00111 QRadioButton *m_btnFunctionsPointsRaw;
00112
00113 QRadioButton *m_btnCurvesLayoutAllCurves;
00114 QRadioButton *m_btnCurvesLayoutOneCurve;
00115
00116 QRadioButton *m_btnRelationsPointsEvenlySpaced;
00117 QLineEdit *m_editRelationsPointsEvenlySpacing;
00118 QDoubleValidator *m_validatorRelationsPointsEvenlySpacing;
00119 QComboBox *m_cmbRelationsPointsEvenlySpacingUnits;
00120 QRadioButton *m_btnRelationsPointsRaw;
00121
00122 QRadioButton *m_btnDelimitersCommas;
00123 QRadioButton *m_btnDelimitersSemicolons;
00124 QRadioButton *m_btnDelimitersSpaces;
00125 QRadioButton *m_btnDelimitersTabs;
00126 QCheckBox *m_chkOverrideCsvTsv;
00127
00128 QRadioButton *m_btnHeaderNone;
00129 QRadioButton *m_btnHeaderSimple;
00130 QRadioButton *m_btnHeaderGnuplot;
00131
00132 QLineEdit *m_editXLabel;
00133
00134 QTextEdit *m_editPreview;
00135
00136 QPushButton *m_btnSaveDefault;
00137
00138 DocumentModelExportFormat *m_modelExportBefore;
00139 DocumentModelExportFormat *m_modelExportAfter;
00140
00141
00142
00143
00144 double m_minIntervalGraph;
00145 double m_minIntervalScreen;
00146
00147 bool m_haveFunction;
00148 bool m_haveRelation;
00149 };
00150
00151 #endif // DLG_SETTINGS_EXPORT_FORMAT_H