1 #include "ChecklistGuidePageCurves.h"
2 #include "ChecklistLineEdit.h"
6 #include <QRadioButton>
7 #include <QTableWidget>
9 const int FIRST_COL = 0;
10 const int NUM_COL = 1;
11 const int NUM_ROW = 6;
16 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::ChecklistGuidePageCurves";
18 addHtml (
"<p>What are the names of the curves that are to be digitized? At least one entry is required.</p>");
22 for (
int i = 0; i < NUM_CURVE_NAMES(); i++) {
24 connect (m_edit [i], SIGNAL (signalKeyRelease()),
this, SLOT (
slotTableChanged()));
28 m_edit [0]->setText (DEFAULT_GRAPH_CURVE_NAME);
32 addHtml (
"<p>How are those curves drawn?</p>");
37 m_btnLines->setChecked (
true);
44 for (
int i = 0; i < NUM_CURVE_NAMES(); i++) {
45 const QLineEdit *edit = m_edit [i];
46 QString text = edit->text();
47 if (!text.isEmpty()) {
55 bool ChecklistGuidePageCurves::curveNamesAreAllUnique()
const
57 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::curveNamesAreAllUnique";
61 int numberDuplicatesRemoved = names.removeDuplicates();
63 return (numberDuplicatesRemoved == 0);
68 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::isComplete";
71 curveNamesAreAllUnique ();
76 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePageCurves::slotTableChanged";
78 emit completeChanged();
83 return m_btnLines->isChecked();
void addLineEdit(ChecklistLineEdit *edit)
Insert line edit.
ChecklistGuidePageCurves()
Single constructor.
This class customizes QWizardPage for ChecklistGuideWizard.
bool withLines() const
Drawn with lines, else points.
QStringList curveNames() const
Wizard selection for curve names.
virtual bool isComplete() const
Validate the contents of this page.
void addHtml(const QString &html)
Insert html for display.
QRadioButton * addLabelAndRadioButton(const QString &label)
Insert radio button and corresponding label.
Adds key event handling to QLineEdit.
void slotTableChanged()
Update after curve table update.