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 /src/languageselectwidget.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 'src/languageselectwidget.cpp')
-rw-r--r-- | src/languageselectwidget.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/languageselectwidget.cpp b/src/languageselectwidget.cpp index 45922c2d..6c6bd357 100644 --- a/src/languageselectwidget.cpp +++ b/src/languageselectwidget.cpp @@ -9,15 +9,15 @@ * * ***************************************************************************/ -#include <qstring.h> -#include <qvariant.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqvariant.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqregexp.h> #include <kconfig.h> #include <kdebug.h> @@ -36,43 +36,43 @@ class LangPluginItem : public QCheckListItem { public: // name - "Name", label - "GenericName", info - "Comment" - LangPluginItem( QListView * parent, QString const & name, QString const & label, - QString const & info ) - : QCheckListItem( parent, label, QCheckListItem::CheckBox), + LangPluginItem( TQListView * parent, TQString const & name, TQString const & label, + TQString const & info ) + : TQCheckListItem( parent, label, TQCheckListItem::CheckBox), _name( name ), _info( info ) {} - QString info() { return _info; } - QString name() { return _name; } + TQString info() { return _info; } + TQString name() { return _name; } private: - QString _name; - QString _info; + TQString _name; + TQString _info; }; -LanguageSelectWidget::LanguageSelectWidget(QDomDocument &projectDom, - QWidget *parent, const char *name) - : QWidget(parent, name), m_projectDom(projectDom) +LanguageSelectWidget::LanguageSelectWidget(TQDomDocument &projectDom, + TQWidget *parent, const char *name) + : TQWidget(parent, name), m_projectDom(projectDom) { init(); } void LanguageSelectWidget::init() { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); - QGroupBox * groupBox1 = new QGroupBox( i18n("Additional Language Support"), this ); + TQGroupBox * groupBox1 = new TQGroupBox( i18n("Additional Language Support"), this ); groupBox1->setColumnLayout(0, Qt::Vertical ); groupBox1->layout()->setSpacing( 6 ); groupBox1->layout()->setMargin( 11 ); - QVBoxLayout * groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); + TQVBoxLayout * groupBox1Layout = new TQVBoxLayout( groupBox1->layout() ); groupBox1Layout->setAlignment( Qt::AlignTop ); - _currentLanguage = new QLabel( "", groupBox1 ); + _currentLanguage = new TQLabel( "", groupBox1 ); - _pluginList = new QListView( groupBox1 ); - _pluginList->setResizeMode( QListView::LastColumn ); + _pluginList = new TQListView( groupBox1 ); + _pluginList->setResizeMode( TQListView::LastColumn ); _pluginList->addColumn(""); _pluginList->header()->hide(); @@ -80,21 +80,21 @@ void LanguageSelectWidget::init() groupBox1Layout->addWidget( _pluginList ); layout->addWidget( groupBox1 ); - QGroupBox * groupBox2 = new QGroupBox( i18n("Description"), this ); + TQGroupBox * groupBox2 = new TQGroupBox( i18n("Description"), this ); groupBox2->setColumnLayout(0, Qt::Vertical ); groupBox2->layout()->setSpacing( 6 ); groupBox2->layout()->setMargin( 11 ); - QVBoxLayout * groupBox2Layout = new QVBoxLayout( groupBox2->layout() ); + TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->layout() ); groupBox2Layout->setAlignment( Qt::AlignTop ); - _pluginDescription = new QLabel( groupBox2 ); - _pluginDescription->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + _pluginDescription = new TQLabel( groupBox2 ); + _pluginDescription->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( _pluginDescription ); layout->addWidget( groupBox2 ); - connect( _pluginList, SIGNAL( selectionChanged( QListViewItem * ) ), this, SLOT( itemSelected( QListViewItem * ) ) ); + connect( _pluginList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this, TQT_SLOT( itemSelected( TQListViewItem * ) ) ); readProjectConfig(); } @@ -106,30 +106,30 @@ LanguageSelectWidget::~LanguageSelectWidget() void LanguageSelectWidget::readProjectConfig() { KTrader::OfferList languageSupportOffers = - KTrader::self()->query(QString::fromLatin1("KDevelop/LanguageSupport"), - QString::fromLatin1("[X-KDevelop-Version] == %1" + KTrader::self()->query(TQString::fromLatin1("KDevelop/LanguageSupport"), + TQString::fromLatin1("[X-KDevelop-Version] == %1" ).arg( KDEVELOP_PLUGIN_VERSION )); - QStringList languages = DomUtil::readListEntry(m_projectDom, "/general/secondaryLanguages", "language"); - QString language = DomUtil::readEntry(m_projectDom, "/general/primarylanguage"); + 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)); for (KTrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it) { - QString la = (*it)->property("X-KDevelop-Language").toString(); + TQString la = (*it)->property("X-KDevelop-Language").toString(); if (la == language) continue; LangPluginItem *item = new LangPluginItem( _pluginList, (*it)->property("X-KDevelop-Language").toString(), (*it)->genericName(), (*it)->comment() ); item->setOn(languages.contains(la)); } - QListViewItem * first = _pluginList->firstChild(); + TQListViewItem * first = _pluginList->firstChild(); if ( first ) { _pluginList->setSelected( first, true ); } } -void LanguageSelectWidget::itemSelected( QListViewItem * item ) +void LanguageSelectWidget::itemSelected( TQListViewItem * item ) { if ( !item ) return; @@ -139,9 +139,9 @@ void LanguageSelectWidget::itemSelected( QListViewItem * item ) void LanguageSelectWidget::saveProjectConfig() { - QStringList languages; + TQStringList languages; - QListViewItemIterator it( _pluginList ); + TQListViewItemIterator it( _pluginList ); while ( it.current() ) { LangPluginItem * item = static_cast<LangPluginItem*>( it.current() ); |