summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
Diffstat (limited to 'addon')
-rw-r--r--addon/doxywizard/expert.cpp9
-rw-r--r--addon/doxywizard/inputbool.cpp4
-rw-r--r--addon/doxywizard/inputint.cpp21
-rw-r--r--addon/doxywizard/inputint.h1
-rw-r--r--addon/doxywizard/inputstring.cpp21
-rw-r--r--addon/doxywizard/inputstring.h1
-rw-r--r--addon/doxywizard/inputstrlist.cpp3
7 files changed, 53 insertions, 7 deletions
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp
index cf33192..e7b7507 100644
--- a/addon/doxywizard/expert.cpp
+++ b/addon/doxywizard/expert.cpp
@@ -270,11 +270,18 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
child = elem.firstChildElement();
while (!child.isNull())
{
+ QString setting = child.attribute(SA("setting"));
QString dependsOn = child.attribute(SA("depends"));
QString id = child.attribute(SA("id"));
- if (!dependsOn.isEmpty())
+ if (!dependsOn.isEmpty() &&
+ (setting.isEmpty() || IS_SUPPORTED(setting.toAscii())))
{
Input *parentOption = m_options[dependsOn];
+ if (parentOption==0)
+ {
+ printf("%s has depends=%s that is not valid\n",
+ qPrintable(id),qPrintable(dependsOn));
+ }
Input *thisOption = m_options[id];
Q_ASSERT(parentOption);
Q_ASSERT(thisOption);
diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp
index 62fcf62..9e28852 100644
--- a/addon/doxywizard/inputbool.cpp
+++ b/addon/doxywizard/inputbool.cpp
@@ -43,6 +43,8 @@ void InputBool::setEnabled(bool b)
{
m_enabled = b;
m_cb->setEnabled(b);
+ m_lab->setEnabled(b);
+ updateDefault();
updateDependencies();
}
@@ -69,7 +71,7 @@ void InputBool::setValue( bool s )
void InputBool::updateDefault()
{
- if (m_state==m_default)
+ if (m_state==m_default || !m_lab->isEnabled())
{
m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt"));
}
diff --git a/addon/doxywizard/inputint.cpp b/addon/doxywizard/inputint.cpp
index 302c3ea..876a920 100644
--- a/addon/doxywizard/inputint.cpp
+++ b/addon/doxywizard/inputint.cpp
@@ -17,6 +17,15 @@
#include <QtGui>
+class NoWheelSpinBox : public QSpinBox
+{
+ protected:
+ void wheelEvent(QWheelEvent *e)
+ {
+ e->ignore();
+ }
+};
+
InputInt::InputInt( QGridLayout *layout,int &row,
const QString & id,
int defVal, int minVal,int maxVal,
@@ -24,7 +33,7 @@ InputInt::InputInt( QGridLayout *layout,int &row,
: m_default(defVal), m_minVal(minVal), m_maxVal(maxVal), m_docs(docs), m_id(id)
{
m_lab = new HelpLabel(id);
- m_sp = new QSpinBox;
+ m_sp = new NoWheelSpinBox;
m_sp->setMinimum(minVal);
m_sp->setMaximum(maxVal);
m_sp->setSingleStep(1);
@@ -56,7 +65,14 @@ void InputInt::setValue(int val)
m_val = val;
m_sp->setValue(val);
m_value = m_val;
- if (m_val==m_default)
+ updateDefault();
+ }
+}
+
+void InputInt::updateDefault()
+{
+ {
+ if (m_val==m_default || !m_lab->isEnabled())
{
m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt"));
}
@@ -72,6 +88,7 @@ void InputInt::setEnabled(bool state)
{
m_lab->setEnabled(state);
m_sp->setEnabled(state);
+ updateDefault();
}
QVariant &InputInt::value()
diff --git a/addon/doxywizard/inputint.h b/addon/doxywizard/inputint.h
index a6a87ed..846b7c2 100644
--- a/addon/doxywizard/inputint.h
+++ b/addon/doxywizard/inputint.h
@@ -56,6 +56,7 @@ class InputInt : public QObject, public Input
void showHelp(Input *);
private:
+ void updateDefault();
QLabel *m_lab;
QSpinBox *m_sp;
int m_val;
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp
index 9e0a0e1..36fe319 100644
--- a/addon/doxywizard/inputstring.cpp
+++ b/addon/doxywizard/inputstring.cpp
@@ -19,6 +19,16 @@
#include <QtGui>
+class NoWheelComboBox : public QComboBox
+{
+ protected:
+ void wheelEvent(QWheelEvent *e)
+ {
+ e->ignore();
+ }
+};
+
+
InputString::InputString( QGridLayout *layout,int &row,
const QString & id, const QString &s,
StringMode m, const QString &docs,
@@ -30,7 +40,7 @@ InputString::InputString( QGridLayout *layout,int &row,
if (m==StringFixed)
{
layout->addWidget( m_lab, row, 0 );
- m_com = new QComboBox;
+ m_com = new NoWheelComboBox;
layout->addWidget( m_com, row, 1, 1, 3, Qt::AlignLeft );
m_le=0;
m_br=0;
@@ -95,7 +105,13 @@ void InputString::setValue(const QString &s)
{
m_str = s;
m_value = m_str;
- if (m_str==m_default)
+ updateDefault();
+ }
+}
+void InputString::updateDefault()
+{
+ {
+ if (m_str==m_default || !m_lab->isEnabled())
{
m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt"));
}
@@ -114,6 +130,7 @@ void InputString::setEnabled(bool state)
if (m_le) m_le->setEnabled(state);
if (m_br) m_br->setEnabled(state);
if (m_com) m_com->setEnabled(state);
+ updateDefault();
}
void InputString::browse()
diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h
index 741f55d..ab2c8e2 100644
--- a/addon/doxywizard/inputstring.h
+++ b/addon/doxywizard/inputstring.h
@@ -72,6 +72,7 @@ class InputString : public QObject, public Input
void help();
private:
+ void updateDefault();
QLabel *m_lab;
QLineEdit *m_le;
QToolBar *m_br;
diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp
index 2e6e624..23c20ff 100644
--- a/addon/doxywizard/inputstrlist.cpp
+++ b/addon/doxywizard/inputstrlist.cpp
@@ -141,6 +141,7 @@ void InputStrList::setEnabled(bool state)
m_lb->setEnabled(state);
if (m_brFile) m_brFile->setEnabled(state);
if (m_brDir) m_brDir->setEnabled(state);
+ updateDefault();
}
void InputStrList::browseFiles()
@@ -222,7 +223,7 @@ void InputStrList::update()
void InputStrList::updateDefault()
{
- if (m_strList==m_default)
+ if (m_strList==m_default || !m_lab->isEnabled())
{
m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt"));
}