Allow disabling motifs
[mussa.git] / qui / motif_editor / MotifDetail.cpp
index 6c76825e3f2b98b99c748a089f5912c37fa6cc98..4774bdfa9880ccbd9b73d5928428723c66ddbb69 100644 (file)
@@ -38,8 +38,9 @@ void MotifDetail::setupWidget()
 {
   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()));
@@ -97,3 +98,8 @@ void MotifDetail::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);
+}