From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/doxygen/doxygenconfigwidget.cpp | 92 +++++++++++++++++------------------ 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'parts/doxygen/doxygenconfigwidget.cpp') 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 -#include -#include -#include +#include +#include +#include +#include #include #include @@ -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 >(257); + m_dependencies = new TQDict< TQPtrList >(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 options = Config::instance()->iterator(); - QScrollView *page = 0; - QVBox *pagebox = 0; + TQPtrListIterator 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 di(*m_switches); + TQDictIterator 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 *switches, - const QCString &dep, const QCString &name) +void DoxygenConfigWidget::addDependency(TQDict *switches, + const TQCString &dep, const TQCString &name) { if (dep.isEmpty()) return; @@ -190,18 +190,18 @@ void DoxygenConfigWidget::addDependency(QDict *switches, Q_ASSERT(child!=0); if (!switches->find(dep)) switches->insert(dep, parent->qobject()); - QPtrList *list = m_dependencies->find(dep); + TQPtrList *list = m_dependencies->find(dep); if (!list) { - list = new QPtrList; + list = new TQPtrList; 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 *inputs = m_dependencies->find(name); + TQPtrList *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 di(*m_inputWidgets); + TQDictIterator di(*m_inputWidgets); for (; di.current(); ++di) di.current()->init(); - QDictIterator dio(*m_switches); + TQDictIterator 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); -- cgit v1.2.1