diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /src/languageselectwidget.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/languageselectwidget.cpp')
-rw-r--r-- | src/languageselectwidget.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/languageselectwidget.cpp b/src/languageselectwidget.cpp index 6c6bd357..e2af092e 100644 --- a/src/languageselectwidget.cpp +++ b/src/languageselectwidget.cpp @@ -32,13 +32,13 @@ #include "languageselectwidget.h" #include "plugincontroller.h" -class LangPluginItem : public QCheckListItem +class LangPluginItem : public TQCheckListItem { public: // name - "Name", label - "GenericName", info - "Comment" - LangPluginItem( TQListView * parent, TQString const & name, TQString const & label, + LangPluginItem( TQListView * tqparent, TQString const & name, TQString const & label, TQString const & info ) - : TQCheckListItem( parent, label, TQCheckListItem::CheckBox), + : TQCheckListItem( tqparent, label, TQCheckListItem::CheckBox), _name( name ), _info( info ) {} @@ -52,22 +52,22 @@ private: LanguageSelectWidget::LanguageSelectWidget(TQDomDocument &projectDom, - TQWidget *parent, const char *name) - : TQWidget(parent, name), m_projectDom(projectDom) + TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name), m_projectDom(projectDom) { init(); } void LanguageSelectWidget::init() { - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); TQGroupBox * groupBox1 = new TQGroupBox( i18n("Additional Language Support"), this ); groupBox1->setColumnLayout(0, Qt::Vertical ); - groupBox1->layout()->setSpacing( 6 ); - groupBox1->layout()->setMargin( 11 ); - TQVBoxLayout * groupBox1Layout = new TQVBoxLayout( groupBox1->layout() ); - groupBox1Layout->setAlignment( Qt::AlignTop ); + groupBox1->tqlayout()->setSpacing( 6 ); + groupBox1->tqlayout()->setMargin( 11 ); + TQVBoxLayout * groupBox1Layout = new TQVBoxLayout( groupBox1->tqlayout() ); + groupBox1Layout->tqsetAlignment( TQt::AlignTop ); _currentLanguage = new TQLabel( "", groupBox1 ); @@ -78,21 +78,21 @@ void LanguageSelectWidget::init() groupBox1Layout->addWidget(_currentLanguage); groupBox1Layout->addWidget( _pluginList ); - layout->addWidget( groupBox1 ); + tqlayout->addWidget( groupBox1 ); TQGroupBox * groupBox2 = new TQGroupBox( i18n("Description"), this ); groupBox2->setColumnLayout(0, Qt::Vertical ); - groupBox2->layout()->setSpacing( 6 ); - groupBox2->layout()->setMargin( 11 ); - TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->layout() ); - groupBox2Layout->setAlignment( Qt::AlignTop ); + groupBox2->tqlayout()->setSpacing( 6 ); + groupBox2->tqlayout()->setMargin( 11 ); + TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() ); + groupBox2Layout->tqsetAlignment( TQt::AlignTop ); _pluginDescription = new TQLabel( groupBox2 ); - _pluginDescription->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); + _pluginDescription->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( _pluginDescription ); - layout->addWidget( groupBox2 ); + tqlayout->addWidget( groupBox2 ); connect( _pluginList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this, TQT_SLOT( itemSelected( TQListViewItem * ) ) ); @@ -106,13 +106,13 @@ LanguageSelectWidget::~LanguageSelectWidget() void LanguageSelectWidget::readProjectConfig() { KTrader::OfferList languageSupportOffers = - KTrader::self()->query(TQString::fromLatin1("KDevelop/LanguageSupport"), - TQString::fromLatin1("[X-KDevelop-Version] == %1" - ).arg( KDEVELOP_PLUGIN_VERSION )); + KTrader::self()->query(TQString::tqfromLatin1("KDevelop/LanguageSupport"), + TQString::tqfromLatin1("[X-KDevelop-Version] == %1" + ).tqarg( KDEVELOP_PLUGIN_VERSION )); TQStringList languages = DomUtil::readListEntry(m_projectDom, "/general/secondaryLanguages", "language"); TQString language = DomUtil::readEntry(m_projectDom, "/general/primarylanguage"); - _currentLanguage->setText(i18n("Primary language is '%1'. Please select additional languages the project might contain.").arg(language)); + _currentLanguage->setText(i18n("Primary language is '%1'. Please select additional languages the project might contain.").tqarg(language)); for (KTrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it) { @@ -120,7 +120,7 @@ void LanguageSelectWidget::readProjectConfig() if (la == language) continue; LangPluginItem *item = new LangPluginItem( _pluginList, (*it)->property("X-KDevelop-Language").toString(), (*it)->genericName(), (*it)->comment() ); - item->setOn(languages.contains(la)); + item->setOn(languages.tqcontains(la)); } TQListViewItem * first = _pluginList->firstChild(); |