summaryrefslogtreecommitdiffstats
path: root/keduca/keducabuilder/kcontrolheader.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /keduca/keducabuilder/kcontrolheader.cpp
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'keduca/keducabuilder/kcontrolheader.cpp')
-rw-r--r--keduca/keducabuilder/kcontrolheader.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/keduca/keducabuilder/kcontrolheader.cpp b/keduca/keducabuilder/kcontrolheader.cpp
index d7a2090a..bdb1e0bb 100644
--- a/keduca/keducabuilder/kcontrolheader.cpp
+++ b/keduca/keducabuilder/kcontrolheader.cpp
@@ -24,10 +24,10 @@
#include <klineedit.h>
#include <kcombobox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-KControlHeader::KControlHeader(FileRead *keducaFile, QWidget *parent, const char *name ) : KDialogBase(Swallow, i18n("Document Information"), Ok|Cancel, Ok, parent, name, true, true)
+KControlHeader::KControlHeader(FileRead *keducaFile, TQWidget *parent, const char *name ) : KDialogBase(Swallow, i18n("Document Information"), Ok|Cancel, Ok, parent, name, true, true)
{
_keducaFile = keducaFile;
init();
@@ -39,122 +39,122 @@ KControlHeader::~KControlHeader(){}
/** Init graphical interface */
void KControlHeader::init()
{
- QWidget *mainView = new QWidget(this);
+ TQWidget *mainView = new TQWidget(this);
- QVBoxLayout *Form2Layout = new QVBoxLayout( mainView );
+ TQVBoxLayout *Form2Layout = new TQVBoxLayout( mainView );
Form2Layout->setSpacing( 6 );
Form2Layout->setMargin( 0 );
- QFrame *Frame16 = new QFrame( mainView, "Frame16" );
- Frame16->setMinimumSize( QSize( 0, 50 ) );
- Frame16->setMaximumSize( QSize( 32767, 50 ) );
- Frame16->setFrameShape( QFrame::Box );
- Frame16->setFrameShadow( QFrame::Plain );
- Frame16->setPalette( QPalette( QColor(255, 255, 255) ) );
- QHBoxLayout *Frame16Layout = new QHBoxLayout( Frame16 );
+ TQFrame *Frame16 = new TQFrame( mainView, "Frame16" );
+ Frame16->setMinimumSize( TQSize( 0, 50 ) );
+ Frame16->setMaximumSize( TQSize( 32767, 50 ) );
+ Frame16->setFrameShape( TQFrame::Box );
+ Frame16->setFrameShadow( TQFrame::Plain );
+ Frame16->setPalette( TQPalette( TQColor(255, 255, 255) ) );
+ TQHBoxLayout *Frame16Layout = new TQHBoxLayout( Frame16 );
Frame16Layout->setSpacing( 6 );
Frame16Layout->setMargin( 1 );
- QFrame *Frame17 = new QFrame( Frame16, "Frame17" );
- Frame17->setMinimumSize( QSize( 125, 0 ) );
- Frame17->setMaximumSize( QSize( 125, 32767 ) );
- Frame17->setFrameShape( QFrame::NoFrame );
- Frame17->setFrameShadow( QFrame::Raised );
- Frame17->setBackgroundPixmap( QPixmap(locate("appdata","pics/bk_frame.png") ) );
- QVBoxLayout *Frame17Layout = new QVBoxLayout( Frame17 );
+ TQFrame *Frame17 = new TQFrame( Frame16, "Frame17" );
+ Frame17->setMinimumSize( TQSize( 125, 0 ) );
+ Frame17->setMaximumSize( TQSize( 125, 32767 ) );
+ Frame17->setFrameShape( TQFrame::NoFrame );
+ Frame17->setFrameShadow( TQFrame::Raised );
+ Frame17->setBackgroundPixmap( TQPixmap(locate("appdata","pics/bk_frame.png") ) );
+ TQVBoxLayout *Frame17Layout = new TQVBoxLayout( Frame17 );
Frame17Layout->setSpacing( 6 );
Frame17Layout->setMargin( 11 );
- QLabel *TextLabel1 = new QLabel( Frame17, "TextLabel1" );
+ TQLabel *TextLabel1 = new TQLabel( Frame17, "TextLabel1" );
TextLabel1->setText( "<b style=\"text-decoration:underline;\">"+i18n("Information")+"</b>" );
- TextLabel1->setBackgroundPixmap( QPixmap(locate("appdata","pics/bk_frame.png") ) );
+ TextLabel1->setBackgroundPixmap( TQPixmap(locate("appdata","pics/bk_frame.png") ) );
Frame17Layout->addWidget( TextLabel1 );
Frame16Layout->addWidget( Frame17 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Frame16Layout->addItem( spacer );
- QLabel *TextLabel2 = new QLabel( Frame16, "TextLabel2" );
+ TQLabel *TextLabel2 = new TQLabel( Frame16, "TextLabel2" );
TextLabel2->setText( i18n( "Description and rules of the project." ) );
- TextLabel2->setPalette( QPalette( QColor(255, 255, 255) ) );
+ TextLabel2->setPalette( TQPalette( TQColor(255, 255, 255) ) );
Frame16Layout->addWidget( TextLabel2 );
Form2Layout->addWidget( Frame16 );
- QGroupBox *GroupBox7 = new QGroupBox( mainView, "GroupBox7" );
+ TQGroupBox *GroupBox7 = new TQGroupBox( mainView, "GroupBox7" );
GroupBox7->setTitle( i18n( "Description" ) );
GroupBox7->setColumnLayout(0, Qt::Vertical );
GroupBox7->layout()->setSpacing( 0 );
GroupBox7->layout()->setMargin( 0 );
- QVBoxLayout *GroupBox7Layout = new QVBoxLayout( GroupBox7->layout() );
+ TQVBoxLayout *GroupBox7Layout = new TQVBoxLayout( GroupBox7->layout() );
GroupBox7Layout->setAlignment( Qt::AlignTop );
GroupBox7Layout->setSpacing( 6 );
GroupBox7Layout->setMargin( 11 );
- QGridLayout *Layout13 = new QGridLayout;
+ TQGridLayout *Layout13 = new QGridLayout;
Layout13->setSpacing( 6 );
Layout13->setMargin( 0 );
- QLabel *TextLabel10 = new QLabel( GroupBox7, "TextLabel10" );
+ TQLabel *TextLabel10 = new TQLabel( GroupBox7, "TextLabel10" );
TextLabel10->setText( i18n( "Type:" ));
- TextLabel10->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel10->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel10, 2, 0 );
- QHBoxLayout *Layout12 = new QHBoxLayout;
+ TQHBoxLayout *Layout12 = new QHBoxLayout;
Layout12->setSpacing( 6 );
Layout12->setMargin( 0 );
_headerType = new KComboBox( FALSE, GroupBox7, "_headerType" );
Layout12->addWidget( _headerType );
- QLabel *TextLabel11 = new QLabel( GroupBox7, "TextLabel11" );
+ TQLabel *TextLabel11 = new TQLabel( GroupBox7, "TextLabel11" );
TextLabel11->setText( i18n( "Level:" ));
- TextLabel11->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel11->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout12->addWidget( TextLabel11 );
_headerLevel = new KComboBox( FALSE, GroupBox7, "_headerLevel" );
Layout12->addWidget( _headerLevel );
Layout13->addLayout( Layout12, 2, 1 );
- QLabel *TextLabel12 = new QLabel( GroupBox7, "TextLabel12" );
+ TQLabel *TextLabel12 = new TQLabel( GroupBox7, "TextLabel12" );
TextLabel12->setText( i18n( "Language:" ));
- TextLabel12->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel12->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel12, 3, 0 );
_headerLang = new KLanguageCombo( GroupBox7, "_headerLang" );
loadCountryList( _headerLang );
Layout13->addWidget( _headerLang, 3, 1 );
- QLabel *TextLabel9 = new QLabel( GroupBox7, "TextLabel9" );
+ TQLabel *TextLabel9 = new TQLabel( GroupBox7, "TextLabel9" );
TextLabel9->setText( i18n( "Category:" ));
- TextLabel9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel9->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel9, 1, 0 );
_headerCategory = new KComboBox( true, GroupBox7, "_headerCategory" );
Layout13->addWidget( _headerCategory, 1, 1 );
- _headerTitle = new QLineEdit( GroupBox7, "_headerTitle" );
+ _headerTitle = new TQLineEdit( GroupBox7, "_headerTitle" );
Layout13->addWidget( _headerTitle, 0, 1 );
- QLabel *TextLabel8 = new QLabel( GroupBox7, "TextLabel8" );
+ TQLabel *TextLabel8 = new TQLabel( GroupBox7, "TextLabel8" );
TextLabel8->setText( i18n( "Title:" ));
- TextLabel8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel8->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
Layout13->addWidget( TextLabel8, 0, 0 );
GroupBox7Layout->addLayout( Layout13 );
Form2Layout->addWidget( GroupBox7 );
- QGroupBox *GroupBox8 = new QGroupBox( mainView, "GroupBox8" );
+ TQGroupBox *GroupBox8 = new TQGroupBox( mainView, "GroupBox8" );
GroupBox8->setTitle( i18n( "Picture" ) );
GroupBox8->setColumnLayout(0, Qt::Vertical );
GroupBox8->layout()->setSpacing( 0 );
GroupBox8->layout()->setMargin( 0 );
- QHBoxLayout *GroupBox8Layout = new QHBoxLayout( GroupBox8->layout() );
+ TQHBoxLayout *GroupBox8Layout = new TQHBoxLayout( GroupBox8->layout() );
GroupBox8Layout->setAlignment( Qt::AlignTop );
GroupBox8Layout->setSpacing( 6 );
GroupBox8Layout->setMargin( 11 );
- QLabel *TextLabel13 = new QLabel( GroupBox8, "TextLabel13" );
+ TQLabel *TextLabel13 = new TQLabel( GroupBox8, "TextLabel13" );
TextLabel13->setText( i18n( "Default picture:" ));
GroupBox8Layout->addWidget( TextLabel13 );
@@ -162,43 +162,43 @@ void KControlHeader::init()
GroupBox8Layout->addWidget( _headerPicture );
Form2Layout->addWidget( GroupBox8 );
- QGroupBox *GroupBox6 = new QGroupBox( mainView, "GroupBox6" );
+ TQGroupBox *GroupBox6 = new TQGroupBox( mainView, "GroupBox6" );
GroupBox6->setTitle( i18n( "Author" ) );
GroupBox6->setColumnLayout(0, Qt::Vertical );
GroupBox6->layout()->setSpacing( 0 );
GroupBox6->layout()->setMargin( 0 );
- QGridLayout *GroupBox6Layout = new QGridLayout( GroupBox6->layout() );
+ TQGridLayout *GroupBox6Layout = new TQGridLayout( GroupBox6->layout() );
GroupBox6Layout->setAlignment( Qt::AlignTop );
GroupBox6Layout->setSpacing( 6 );
GroupBox6Layout->setMargin( 11 );
- _headerName = new QLineEdit( GroupBox6, "_headerName" );
+ _headerName = new TQLineEdit( GroupBox6, "_headerName" );
GroupBox6Layout->addWidget( _headerName, 0, 1 );
- _headerEmail = new QLineEdit( GroupBox6, "_headerEmail" );
+ _headerEmail = new TQLineEdit( GroupBox6, "_headerEmail" );
GroupBox6Layout->addWidget( _headerEmail, 1, 1 );
- QLabel *TextLabel7 = new QLabel( GroupBox6, "TextLabel7" );
+ TQLabel *TextLabel7 = new TQLabel( GroupBox6, "TextLabel7" );
TextLabel7->setText( i18n( "Web page:" ));
- TextLabel7->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel7->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
GroupBox6Layout->addWidget( TextLabel7, 2, 0 );
- QLabel *TextLabel6 = new QLabel( GroupBox6, "TextLabel6" );
+ TQLabel *TextLabel6 = new TQLabel( GroupBox6, "TextLabel6" );
TextLabel6->setText( i18n( "Email:" ));
- TextLabel6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel6->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
GroupBox6Layout->addWidget( TextLabel6, 1, 0 );
- QLabel *TextLabel5 = new QLabel( GroupBox6, "TextLabel5" );
+ TQLabel *TextLabel5 = new TQLabel( GroupBox6, "TextLabel5" );
TextLabel5->setText( i18n( "Name:" ));
- TextLabel5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel5->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
GroupBox6Layout->addWidget( TextLabel5, 0, 0 );
- _headerWWW = new QLineEdit( GroupBox6, "_headerWWW" );
+ _headerWWW = new TQLineEdit( GroupBox6, "_headerWWW" );
GroupBox6Layout->addWidget( _headerWWW, 2, 1 );
Form2Layout->addWidget( GroupBox6 );
@@ -223,7 +223,7 @@ void KControlHeader::init()
/** Insert header */
void KControlHeader::insertHeader()
{
- QStringList tmpResult = _defaultCategories.grep( _headerCategory->currentText() );
+ TQStringList tmpResult = _defaultCategories.grep( _headerCategory->currentText() );
if( tmpResult.count() == 0 )
{
KConfig *appconfig = KGlobal::config();
@@ -235,8 +235,8 @@ void KControlHeader::insertHeader()
_keducaFile->setHeader( "category", _headerCategory->currentText() );
_keducaFile->setHeader( "title", _headerTitle->text() );
_keducaFile->setHeader( "image", _headerPicture->url() );
- _keducaFile->setHeader( "type", QString().setNum( _headerType->currentItem() + 1 ) );
- _keducaFile->setHeader( "level", QString().setNum( _headerLevel->currentItem() + 1 ) );
+ _keducaFile->setHeader( "type", TQString().setNum( _headerType->currentItem() + 1 ) );
+ _keducaFile->setHeader( "level", TQString().setNum( _headerLevel->currentItem() + 1 ) );
_keducaFile->setHeader( "language", _headerLang->currentTag() );
_keducaFile->setHeader( "name", _headerName->text() );
_keducaFile->setHeader( "email", _headerEmail->text() );
@@ -246,19 +246,19 @@ void KControlHeader::insertHeader()
/** Load country list */
void KControlHeader::loadCountryList(KLanguageCombo *combo)
{
- QString sub = QString::fromLatin1("l10n/");
+ TQString sub = TQString::fromLatin1("l10n/");
// clear the list
combo->clear();
- QStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + QString::fromLatin1("*.desktop"));
+ TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*.desktop"));
regionlist.sort();
- for ( QStringList::ConstIterator it = regionlist.begin();
+ for ( TQStringList::ConstIterator it = regionlist.begin();
it != regionlist.end();
++it )
{
- QString tag = *it;
+ TQString tag = *it;
int index;
index = tag.findRev('/');
@@ -268,25 +268,25 @@ void KControlHeader::loadCountryList(KLanguageCombo *combo)
if (index != -1) tag.truncate(index);
KSimpleConfig entry(*it);
- entry.setGroup(QString::fromLatin1("KCM Locale"));
- QString name = entry.readEntry(QString::fromLatin1("Name"));
+ entry.setGroup(TQString::fromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::fromLatin1("Name"));
combo->insertSubmenu( name, '-' + tag, sub );
}
// add all languages to the list
- QStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + QString::fromLatin1("*/entry.desktop"));
+ TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*/entry.desktop"));
countrylist.sort();
- for ( QStringList::ConstIterator it = countrylist.begin();
+ for ( TQStringList::ConstIterator it = countrylist.begin();
it != countrylist.end(); ++it )
{
KSimpleConfig entry(*it);
- entry.setGroup(QString::fromLatin1("KCM Locale"));
- QString name = entry.readEntry(QString::fromLatin1("Name"));
- QString submenu = '-' + entry.readEntry(QString::fromLatin1("Region"));
+ entry.setGroup(TQString::fromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::fromLatin1("Name"));
+ TQString submenu = '-' + entry.readEntry(TQString::fromLatin1("Region"));
- QString tag = *it;
+ TQString tag = *it;
int index = tag.findRev('/');
tag.truncate(index);
index = tag.findRev('/');
@@ -312,12 +312,12 @@ void KControlHeader::configRead()
config->setGroup("UserInfo");
if( _keducaFile->getHeader( "name" ).isEmpty() )
- _headerName->setText(config->readEntry("FullName", QString::null ));
+ _headerName->setText(config->readEntry("FullName", TQString::null ));
else
_headerName->setText( _keducaFile->getHeader("name") );
if( _keducaFile->getHeader( "email" ).isEmpty() )
- _headerEmail->setText(config->readEntry("EmailAddress", QString::null ));
+ _headerEmail->setText(config->readEntry("EmailAddress", TQString::null ));
else
_headerEmail->setText( _keducaFile->getHeader("email") );
@@ -349,19 +349,19 @@ void KControlHeader::configRead()
_headerType->insertItem( i18n("Slidershow") );
_headerType->insertItem( i18n("Exam") );
_headerType->insertItem( i18n("Psychotechnic Test") );
- if( QString(_keducaFile->getHeader("type")).toInt() > 0 ) _headerType->setCurrentItem( QString(_keducaFile->getHeader("type")).toInt() -1 );
+ if( TQString(_keducaFile->getHeader("type")).toInt() > 0 ) _headerType->setCurrentItem( TQString(_keducaFile->getHeader("type")).toInt() -1 );
_headerLevel->insertItem( i18n("Easy") );
_headerLevel->insertItem( i18n("Normal") );
_headerLevel->insertItem( i18n("Expert") );
_headerLevel->insertItem( i18n("Supreme") );
- if( QString(_keducaFile->getHeader("level")).toInt() >0 ) _headerLevel->setCurrentItem( QString(_keducaFile->getHeader("level")).toInt() -1 );
+ if( TQString(_keducaFile->getHeader("level")).toInt() >0 ) _headerLevel->setCurrentItem( TQString(_keducaFile->getHeader("level")).toInt() -1 );
_headerPicture->setURL( _keducaFile->getHeader("image") );
_headerTitle->setText( _keducaFile->getHeader("title") );
appconfig->setGroup("kcontrolheader");
- QSize *defaultSize = new QSize(500,400);
+ TQSize *defaultSize = new TQSize(500,400);
resize( appconfig->readSizeEntry("Geometry", defaultSize ) );
delete config;
}