diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /parts/doxygen/doxygenconfigwidget.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/doxygen/doxygenconfigwidget.cpp')
-rw-r--r-- | parts/doxygen/doxygenconfigwidget.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/parts/doxygen/doxygenconfigwidget.cpp b/parts/doxygen/doxygenconfigwidget.cpp index 27f39863..8269bf0e 100644 --- a/parts/doxygen/doxygenconfigwidget.cpp +++ b/parts/doxygen/doxygenconfigwidget.cpp @@ -13,10 +13,10 @@ #include "doxygenconfigwidget.h" -#include <qscrollview.h> -#include <qvbox.h> -#include <qwhatsthis.h> -#include <qtextstream.h> +#include <tqscrollview.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> +#include <tqtextstream.h> #include <klocale.h> #include <kdebug.h> @@ -27,30 +27,30 @@ #include "messages.h" -DoxygenConfigWidget::DoxygenConfigWidget(const QString &fileName, QWidget *parent, const char *name) - : QTabWidget(parent, name) +DoxygenConfigWidget::DoxygenConfigWidget(const TQString &fileName, TQWidget *parent, const char *name) + : TQTabWidget(parent, name) { m_hasChanged = false; - m_dependencies = new QDict< QPtrList<IInput> >(257); + m_dependencies = new TQDict< TQPtrList<IInput> >(257); m_dependencies->setAutoDelete(true); - m_inputWidgets = new QDict< IInput >; - m_switches = new QDict< QObject >; + m_inputWidgets = new TQDict< IInput >; + m_switches = new TQDict< TQObject >; - QPtrListIterator<ConfigOption> options = Config::instance()->iterator(); - QScrollView *page = 0; - QVBox *pagebox = 0; + TQPtrListIterator<ConfigOption> options = Config::instance()->iterator(); + TQScrollView *page = 0; + TQVBox *pagebox = 0; ConfigOption *option = 0; for (options.toFirst(); (option=options.current()); ++options) { switch(option->kind()) { case ConfigOption::O_Info: - page = new QScrollView(this, option->name()); + page = new TQScrollView(this, option->name()); page->viewport()->setBackgroundMode(PaletteBackground); - pagebox = new QVBox(0); + pagebox = new TQVBox(0); Q_ASSERT(pagebox!=0); page->addChild(pagebox); addTab(page, message(option->name())); - QWhatsThis::add(page, option->docs().simplifyWhiteSpace() ); + TQWhatsThis::add(page, option->docs().simplifyWhiteSpace() ); break; case ConfigOption::O_String: { @@ -67,8 +67,8 @@ DoxygenConfigWidget::DoxygenConfigWidget(const QString &fileName, QWidget *paren *((ConfigString *)option)->valueRef(), // variable sm // type ); - QWhatsThis::add(inputString, option->docs().simplifyWhiteSpace()); - connect(inputString, SIGNAL(changed()), this, SLOT(changed())); + TQWhatsThis::add(inputString, option->docs().simplifyWhiteSpace()); + connect(inputString, TQT_SIGNAL(changed()), this, TQT_SLOT(changed())); m_inputWidgets->insert(option->name(), inputString); addDependency(m_switches, option->dependsOn(), option->name()); } @@ -82,11 +82,11 @@ DoxygenConfigWidget::DoxygenConfigWidget(const QString &fileName, QWidget *paren *((ConfigEnum *)option)->valueRef(), // variable InputString::StringFixed // type ); - QStrListIterator sli=((ConfigEnum *)option)->iterator(); + TQStrListIterator sli=((ConfigEnum *)option)->iterator(); for (sli.toFirst(); sli.current(); ++sli) inputString->addValue(sli.current()); - QWhatsThis::add(inputString, option->docs().simplifyWhiteSpace()); - connect(inputString, SIGNAL(changed()), this, SLOT(changed())); + TQWhatsThis::add(inputString, option->docs().simplifyWhiteSpace()); + connect(inputString, TQT_SIGNAL(changed()), this, TQT_SLOT(changed())); m_inputWidgets->insert(option->name(),inputString); addDependency(m_switches, option->dependsOn(), option->name()); } @@ -108,8 +108,8 @@ DoxygenConfigWidget::DoxygenConfigWidget(const QString &fileName, QWidget *paren *((ConfigList *)option)->valueRef(), // variable lm // type ); - QWhatsThis::add(inputStrList, option->docs().simplifyWhiteSpace()); - connect(inputStrList, SIGNAL(changed()), this, SLOT(changed())); + TQWhatsThis::add(inputStrList, option->docs().simplifyWhiteSpace()); + connect(inputStrList, TQT_SIGNAL(changed()), this, TQT_SLOT(changed())); m_inputWidgets->insert(option->name(),inputStrList); addDependency(m_switches, option->dependsOn(), option->name()); } @@ -123,8 +123,8 @@ DoxygenConfigWidget::DoxygenConfigWidget(const QString &fileName, QWidget *paren pagebox, // widget *((ConfigBool *)option)->valueRef() // variable ); - QWhatsThis::add(inputBool, option->docs().simplifyWhiteSpace()); - connect(inputBool, SIGNAL(changed()), this, SLOT(changed())); + TQWhatsThis::add(inputBool, option->docs().simplifyWhiteSpace()); + connect(inputBool, TQT_SIGNAL(changed()), this, TQT_SLOT(changed())); m_inputWidgets->insert(option->name(), inputBool); addDependency(m_switches, option->dependsOn(), option->name()); } @@ -139,8 +139,8 @@ DoxygenConfigWidget::DoxygenConfigWidget(const QString &fileName, QWidget *paren ((ConfigInt *)option)->minVal(), // min value ((ConfigInt *)option)->maxVal() // max value ); - QWhatsThis::add(inputInt, option->docs().simplifyWhiteSpace()); - connect(inputInt, SIGNAL(changed()), this, SLOT(changed())); + TQWhatsThis::add(inputInt, option->docs().simplifyWhiteSpace()); + connect(inputInt, TQT_SIGNAL(changed()), this, TQT_SLOT(changed())); m_inputWidgets->insert(option->name(), inputInt); addDependency(m_switches, option->dependsOn(), option->name()); } @@ -150,10 +150,10 @@ DoxygenConfigWidget::DoxygenConfigWidget(const QString &fileName, QWidget *paren } } - QDictIterator<QObject> di(*m_switches); + TQDictIterator<TQObject> di(*m_switches); for (; di.current(); ++di) { - QObject *obj = di.current(); - connect(obj, SIGNAL(toggle(const QString&, bool)), this, SLOT(toggle(const QString&, bool))); + TQObject *obj = di.current(); + connect(obj, TQT_SIGNAL(toggle(const TQString&, bool)), this, TQT_SLOT(toggle(const TQString&, bool))); // UGLY HACK: assumes each item depends on a boolean without checking! emit toggle(di.currentKey(), ((InputBool *)obj)->getState()); } @@ -171,15 +171,15 @@ DoxygenConfigWidget::~DoxygenConfigWidget() } -QSize DoxygenConfigWidget::sizeHint() const +TQSize DoxygenConfigWidget::sizeHint() const { // without this the whole dialog becomes much too large - return QSize(QTabWidget::sizeHint().width(), 1); + return TQSize(TQTabWidget::sizeHint().width(), 1); } -void DoxygenConfigWidget::addDependency(QDict<QObject> *switches, - const QCString &dep, const QCString &name) +void DoxygenConfigWidget::addDependency(TQDict<TQObject> *switches, + const TQCString &dep, const TQCString &name) { if (dep.isEmpty()) return; @@ -190,18 +190,18 @@ void DoxygenConfigWidget::addDependency(QDict<QObject> *switches, Q_ASSERT(child!=0); if (!switches->find(dep)) switches->insert(dep, parent->qobject()); - QPtrList<IInput> *list = m_dependencies->find(dep); + TQPtrList<IInput> *list = m_dependencies->find(dep); if (!list) { - list = new QPtrList<IInput>; + list = new TQPtrList<IInput>; m_dependencies->insert(dep, list); } list->append(child); } -void DoxygenConfigWidget::toggle(const QString &name, bool state) +void DoxygenConfigWidget::toggle(const TQString &name, bool state) { - QPtrList<IInput> *inputs = m_dependencies->find(name); + TQPtrList<IInput> *inputs = m_dependencies->find(name); Q_ASSERT(inputs!=0); IInput *input = inputs->first(); while (input) { @@ -219,14 +219,14 @@ void DoxygenConfigWidget::changed() void DoxygenConfigWidget::init() { - QDictIterator<IInput> di(*m_inputWidgets); + TQDictIterator<IInput> di(*m_inputWidgets); for (; di.current(); ++di) di.current()->init(); - QDictIterator<QObject> dio(*m_switches); + TQDictIterator<TQObject> dio(*m_switches); for (; dio.current(); ++dio) { - QObject *obj = dio.current(); - connect(obj, SIGNAL(toggle(const QString&, bool)), this, SLOT(toggle(const QString&, bool))); + TQObject *obj = dio.current(); + connect(obj, TQT_SIGNAL(toggle(const TQString&, bool)), this, TQT_SLOT(toggle(const TQString&, bool))); // UGLY HACK: assumes each item depends on a boolean without checking! emit toggle(dio.currentKey(), ((InputBool *)obj)->getState()); } @@ -237,11 +237,11 @@ void DoxygenConfigWidget::loadFile() { Config::instance()->init(); - QFile f(m_fileName); + TQFile f(m_fileName); if (f.open(IO_ReadOnly)) { - QTextStream is(&f); + TQTextStream is(&f); - Config::instance()->parse(QFile::encodeName(m_fileName)); + Config::instance()->parse(TQFile::encodeName(m_fileName)); Config::instance()->convertStrToVal(); f.close(); @@ -253,11 +253,11 @@ void DoxygenConfigWidget::loadFile() void DoxygenConfigWidget::saveFile() { - QFile f(m_fileName); + TQFile f(m_fileName); if (!f.open(IO_WriteOnly)) { KMessageBox::information(0, i18n("Cannot write Doxyfile.")); } else { - QTextStream t(&f); + TQTextStream t(&f); Config::instance()->writeTemplate(t, true, false); |