summaryrefslogtreecommitdiffstats
path: root/addon/doxywizard/inputstring.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-05-12 13:04:34 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-05-12 13:04:34 (GMT)
commit8dc4ff6dd22b1603f33537ff03994cc63e658768 (patch)
tree97f0e23b93d45b7917d965e6d1bb70da6c61831a /addon/doxywizard/inputstring.cpp
parentebf4b3641c9149eaf4468aa8df64e1c7517e5f0c (diff)
downloadDoxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.zip
Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.tar.gz
Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.tar.bz2
Release-1.8.3.1-20130512
Diffstat (limited to 'addon/doxywizard/inputstring.cpp')
-rw-r--r--addon/doxywizard/inputstring.cpp21
1 files changed, 19 insertions, 2 deletions
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()