summaryrefslogtreecommitdiffstats
path: root/keduca/keducabuilder/kcontrolheader.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /keduca/keducabuilder/kcontrolheader.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'keduca/keducabuilder/kcontrolheader.cpp')
-rw-r--r--keduca/keducabuilder/kcontrolheader.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/keduca/keducabuilder/kcontrolheader.cpp b/keduca/keducabuilder/kcontrolheader.cpp
index e46bfdc4..4c1081a2 100644
--- a/keduca/keducabuilder/kcontrolheader.cpp
+++ b/keduca/keducabuilder/kcontrolheader.cpp
@@ -27,7 +27,7 @@
#include <tqlayout.h>
#include <tqlabel.h>
-KControlHeader::KControlHeader(FileRead *keducaFile, TQWidget *parent, const char *name ) : KDialogBase(Swallow, i18n("Document Information"), Ok|Cancel, Ok, parent, name, true, true)
+KControlHeader::KControlHeader(FileRead *keducaFile, TQWidget *tqparent, const char *name ) : KDialogBase(Swallow, i18n("Document Information"), Ok|Cancel, Ok, tqparent, name, true, true)
{
_keducaFile = keducaFile;
init();
@@ -82,10 +82,10 @@ void KControlHeader::init()
TQGroupBox *GroupBox7 = new TQGroupBox( mainView, "GroupBox7" );
GroupBox7->setTitle( i18n( "Description" ) );
GroupBox7->setColumnLayout(0, Qt::Vertical );
- GroupBox7->layout()->setSpacing( 0 );
- GroupBox7->layout()->setMargin( 0 );
- TQVBoxLayout *GroupBox7Layout = new TQVBoxLayout( GroupBox7->layout() );
- GroupBox7Layout->setAlignment( Qt::AlignTop );
+ GroupBox7->tqlayout()->setSpacing( 0 );
+ GroupBox7->tqlayout()->setMargin( 0 );
+ TQVBoxLayout *GroupBox7Layout = new TQVBoxLayout( GroupBox7->tqlayout() );
+ GroupBox7Layout->tqsetAlignment( TQt::AlignTop );
GroupBox7Layout->setSpacing( 6 );
GroupBox7Layout->setMargin( 11 );
@@ -95,7 +95,7 @@ void KControlHeader::init()
TQLabel *TextLabel10 = new TQLabel( GroupBox7, "TextLabel10" );
TextLabel10->setText( i18n( "Type:" ));
- TextLabel10->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel10->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel10, 2, 0 );
@@ -108,7 +108,7 @@ void KControlHeader::init()
TQLabel *TextLabel11 = new TQLabel( GroupBox7, "TextLabel11" );
TextLabel11->setText( i18n( "Level:" ));
- TextLabel11->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel11->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout12->addWidget( TextLabel11 );
_headerLevel = new KComboBox( FALSE, GroupBox7, "_headerLevel" );
@@ -117,7 +117,7 @@ void KControlHeader::init()
TQLabel *TextLabel12 = new TQLabel( GroupBox7, "TextLabel12" );
TextLabel12->setText( i18n( "Language:" ));
- TextLabel12->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel12->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel12, 3, 0 );
_headerLang = new KLanguageCombo( GroupBox7, "_headerLang" );
@@ -126,7 +126,7 @@ void KControlHeader::init()
TQLabel *TextLabel9 = new TQLabel( GroupBox7, "TextLabel9" );
TextLabel9->setText( i18n( "Category:" ));
- TextLabel9->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel9->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel9, 1, 0 );
@@ -138,7 +138,7 @@ void KControlHeader::init()
TQLabel *TextLabel8 = new TQLabel( GroupBox7, "TextLabel8" );
TextLabel8->setText( i18n( "Title:" ));
- TextLabel8->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel8->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel8, 0, 0 );
GroupBox7Layout->addLayout( Layout13 );
@@ -147,10 +147,10 @@ void KControlHeader::init()
TQGroupBox *GroupBox8 = new TQGroupBox( mainView, "GroupBox8" );
GroupBox8->setTitle( i18n( "Picture" ) );
GroupBox8->setColumnLayout(0, Qt::Vertical );
- GroupBox8->layout()->setSpacing( 0 );
- GroupBox8->layout()->setMargin( 0 );
- TQHBoxLayout *GroupBox8Layout = new TQHBoxLayout( GroupBox8->layout() );
- GroupBox8Layout->setAlignment( Qt::AlignTop );
+ GroupBox8->tqlayout()->setSpacing( 0 );
+ GroupBox8->tqlayout()->setMargin( 0 );
+ TQHBoxLayout *GroupBox8Layout = new TQHBoxLayout( GroupBox8->tqlayout() );
+ GroupBox8Layout->tqsetAlignment( TQt::AlignTop );
GroupBox8Layout->setSpacing( 6 );
GroupBox8Layout->setMargin( 11 );
@@ -165,10 +165,10 @@ void KControlHeader::init()
TQGroupBox *GroupBox6 = new TQGroupBox( mainView, "GroupBox6" );
GroupBox6->setTitle( i18n( "Author" ) );
GroupBox6->setColumnLayout(0, Qt::Vertical );
- GroupBox6->layout()->setSpacing( 0 );
- GroupBox6->layout()->setMargin( 0 );
- TQGridLayout *GroupBox6Layout = new TQGridLayout( GroupBox6->layout() );
- GroupBox6Layout->setAlignment( Qt::AlignTop );
+ GroupBox6->tqlayout()->setSpacing( 0 );
+ GroupBox6->tqlayout()->setMargin( 0 );
+ TQGridLayout *GroupBox6Layout = new TQGridLayout( GroupBox6->tqlayout() );
+ GroupBox6Layout->tqsetAlignment( TQt::AlignTop );
GroupBox6Layout->setSpacing( 6 );
GroupBox6Layout->setMargin( 11 );
@@ -182,19 +182,19 @@ void KControlHeader::init()
TQLabel *TextLabel7 = new TQLabel( GroupBox6, "TextLabel7" );
TextLabel7->setText( i18n( "Web page:" ));
- TextLabel7->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel7->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
GroupBox6Layout->addWidget( TextLabel7, 2, 0 );
TQLabel *TextLabel6 = new TQLabel( GroupBox6, "TextLabel6" );
TextLabel6->setText( i18n( "Email:" ));
- TextLabel6->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel6->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
GroupBox6Layout->addWidget( TextLabel6, 1, 0 );
TQLabel *TextLabel5 = new TQLabel( GroupBox6, "TextLabel5" );
TextLabel5->setText( i18n( "Name:" ));
- TextLabel5->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ TextLabel5->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
GroupBox6Layout->addWidget( TextLabel5, 0, 0 );
@@ -246,12 +246,12 @@ void KControlHeader::insertHeader()
/** Load country list */
void KControlHeader::loadCountryList(KLanguageCombo *combo)
{
- TQString sub = TQString::fromLatin1("l10n/");
+ TQString sub = TQString::tqfromLatin1("l10n/");
// clear the list
combo->clear();
- TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*.desktop"));
+ TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::tqfromLatin1("*.desktop"));
regionlist.sort();
for ( TQStringList::ConstIterator it = regionlist.begin();
@@ -261,35 +261,35 @@ void KControlHeader::loadCountryList(KLanguageCombo *combo)
TQString tag = *it;
int index;
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
if (index != -1) tag = tag.mid(index + 1);
- index = tag.findRev('.');
+ index = tag.tqfindRev('.');
if (index != -1) tag.truncate(index);
KSimpleConfig entry(*it);
- entry.setGroup(TQString::fromLatin1("KCM Locale"));
- TQString name = entry.readEntry(TQString::fromLatin1("Name"));
+ entry.setGroup(TQString::tqfromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::tqfromLatin1("Name"));
combo->insertSubmenu( name, '-' + tag, sub );
}
// add all languages to the list
- TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*/entry.desktop"));
+ TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::tqfromLatin1("*/entry.desktop"));
countrylist.sort();
for ( TQStringList::ConstIterator it = countrylist.begin();
it != countrylist.end(); ++it )
{
KSimpleConfig entry(*it);
- entry.setGroup(TQString::fromLatin1("KCM Locale"));
- TQString name = entry.readEntry(TQString::fromLatin1("Name"));
- TQString submenu = '-' + entry.readEntry(TQString::fromLatin1("Region"));
+ entry.setGroup(TQString::tqfromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::tqfromLatin1("Name"));
+ TQString submenu = '-' + entry.readEntry(TQString::tqfromLatin1("Region"));
TQString tag = *it;
- int index = tag.findRev('/');
+ int index = tag.tqfindRev('/');
tag.truncate(index);
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
tag = tag.mid(index+1);
combo->insertLanguage(tag, name, sub, submenu);
}
@@ -312,12 +312,12 @@ void KControlHeader::configRead()
config->setGroup("UserInfo");
if( _keducaFile->getHeader( "name" ).isEmpty() )
- _headerName->setText(config->readEntry("FullName", TQString::null ));
+ _headerName->setText(config->readEntry("FullName", TQString() ));
else
_headerName->setText( _keducaFile->getHeader("name") );
if( _keducaFile->getHeader( "email" ).isEmpty() )
- _headerEmail->setText(config->readEntry("EmailAddress", TQString::null ));
+ _headerEmail->setText(config->readEntry("EmailAddress", TQString() ));
else
_headerEmail->setText( _keducaFile->getHeader("email") );