{
QHBoxLayout *layout = new QHBoxLayout;
+ enabledButton.setCheckState(Qt::Checked);
+ layout->addWidget(&enabledButton);
colorButton.setFlat(true);
-
colorButton.setPalette(QPalette(qcolor()));
colorButton.setAutoFillBackground(true);
connect(&colorButton, SIGNAL(clicked()), this, SLOT(promptColor()));
Color new_color(new_qcolor.redF(), new_qcolor.greenF(), new_qcolor.blueF());
setColor(new_color);
}
+
+bool MotifDetail::enabled() const
+{
+ return (enabledButton.checkState() == Qt::Checked);
+}
#include <string>
+#include <QCheckBox>
#include <QColor>
#include <QLineEdit>
#include <QPushButton>
Color color() const;
QColor qcolor() const;
+ // is this motif enabled?
+ bool MotifDetail::enabled() const;
+
public slots:
void promptColor();
Color motif_color;
// widgets
+ QCheckBox enabledButton;
QPushButton colorButton;
QLineEdit motifText;
QLineEdit motifName;
md_i != motif_details.end();
++md_i)
{
- if ((*md_i)->motif().size() > 0) {
+ if ((*md_i)->motif().size() > 0 && (*md_i)->enabled()) {
motifs.push_back((*md_i)->motif());
colors.push_back((*md_i)->color());
}