7 #include "ChecklistGuidePageCurves.h" 8 #include "ChecklistLineEdit.h" 11 #include <QHeaderView> 12 #include <QRadioButton> 13 #include <QTableWidget> 14 #include "SettingsForGraph.h" 19 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::ChecklistGuidePageCurves";
21 const QString WHATS_THIS_CURVE (tr (
"Curve name. Empty if unused."));
22 const QString WHATS_THIS_LINES (tr (
"Draw lines between points in each curve."));
23 const QString WHATS_THIS_POINTS (tr (
"Draw points in each curve, without lines between the points."));
25 addHtml (tr (
"<p>What are the names of the curves that are to be digitized? At least one entry is required.</p>"));
29 for (
int i = 0; i < NUM_CURVE_NAMES(); i++) {
31 connect (m_edit [i], SIGNAL (signalKeyRelease()),
this, SLOT (
slotTableChanged()));
38 DEFAULT_GRAPH_CURVE_NAME);
40 m_edit [0]->setText (curveName);
44 addHtml (tr (
"<p>How are those curves drawn?</p>"));
51 m_btnLines->setChecked (
true);
58 for (
int i = 0; i < NUM_CURVE_NAMES(); i++) {
59 const QLineEdit *edit = m_edit [i];
60 QString text = edit->text();
61 if (!text.isEmpty()) {
69 bool ChecklistGuidePageCurves::curveNamesAreAllUnique()
const 71 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::curveNamesAreAllUnique";
75 int numberDuplicatesRemoved = names.removeDuplicates();
77 return (numberDuplicatesRemoved == 0);
82 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::isComplete";
85 curveNamesAreAllUnique ();
90 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::slotTableChanged";
92 emit completeChanged();
97 return m_btnLines->isChecked();
Manage storage and retrieval of the settings for the curves.
ChecklistGuidePageCurves(const QString &title)
Single constructor.
QStringList curveNames() const
Wizard selection for curve names.
This class customizes QWizardPage for ChecklistGuideWizard.
void addLineEdit(ChecklistLineEdit *edit, const QString &whatsThis)
Insert line edit.
virtual bool isComplete() const
Validate the contents of this page.
QRadioButton * addLabelAndRadioButton(const QString &label, const QString &whatsThis)
Insert radio button and corresponding label.
void addHtml(const QString &html)
Insert html for display.
Adds key event handling to QLineEdit.
QString defaultCurveName(int indexOneBased, const QString &defaultName) const
Default graph name for the specified curve index.
bool withLines() const
Drawn with lines, else points.
void slotTableChanged()
Update after curve table update.