summaryrefslogtreecommitdiffstats
path: root/keduca/keducabuilder
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
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')
-rw-r--r--keduca/keducabuilder/kcontroladdedit.cpp40
-rw-r--r--keduca/keducabuilder/kcontroladdedit.h12
-rw-r--r--keduca/keducabuilder/kcontrolheader.cpp146
-rw-r--r--keduca/keducabuilder/kcontrolheader.h12
-rw-r--r--keduca/keducabuilder/keducabuilder.cpp114
-rw-r--r--keduca/keducabuilder/keducabuilder.h16
-rw-r--r--keduca/keducabuilder/keducaeditorstartdialog.cpp18
-rw-r--r--keduca/keducabuilder/klangcombo.cpp14
-rw-r--r--keduca/keducabuilder/klangcombo.h6
-rw-r--r--keduca/keducabuilder/ktagcombobox.cpp86
-rw-r--r--keduca/keducabuilder/ktagcombobox.h38
-rw-r--r--keduca/keducabuilder/main.cpp4
12 files changed, 253 insertions, 253 deletions
diff --git a/keduca/keducabuilder/kcontroladdedit.cpp b/keduca/keducabuilder/kcontroladdedit.cpp
index 76715e27..f8b60562 100644
--- a/keduca/keducabuilder/kcontroladdedit.cpp
+++ b/keduca/keducabuilder/kcontroladdedit.cpp
@@ -28,10 +28,10 @@
//#include <.h>
// Qt includes
-#include <qlabel.h>
-#include <qtextedit.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
-KControlAddEdit::KControlAddEdit(QWidget *parent, const char *name, bool modal, WFlags f)
+KControlAddEdit::KControlAddEdit(TQWidget *parent, const char *name, bool modal, WFlags f)
: KControlAddEditBase(parent, name, modal, f),
_currentAnswerItem(0)
{
@@ -90,16 +90,16 @@ void KControlAddEdit::fillPage()
_keducaFile->recordAnswerFirst();
while( !_keducaFile->recordAnswerEOF() )
{
- QListViewItem *newItem = new QListViewItem(_listAnswers);
+ TQListViewItem *newItem = new TQListViewItem(_listAnswers);
newItem->setText(0,_keducaFile->getAnswer( FileRead::AF_TEXT ));
newItem->setText(1,_keducaFile->getAnswerValue()?i18n("True"):i18n("False"));
- newItem->setText(2,QString::number(_keducaFile->getAnswerPoints()));
+ newItem->setText(2,TQString::number(_keducaFile->getAnswerPoints()));
_keducaFile->recordAnswerNext();
};
}
-void KControlAddEdit::setCurrentAnswerItem(QListViewItem *item)
+void KControlAddEdit::setCurrentAnswerItem(TQListViewItem *item)
{
_currentAnswerItem = item;
if (item)
@@ -114,12 +114,12 @@ void KControlAddEdit::slotAddAnswer()
if( !_answerText->text().isEmpty() )
{
// add new listview item
- QListViewItem *newItem = _currentAnswerItem
+ TQListViewItem *newItem = _currentAnswerItem
? _currentAnswerItem
- : new QListViewItem(_listAnswers,_listAnswers->lastItem());
+ : new TQListViewItem(_listAnswers,_listAnswers->lastItem());
newItem->setText(0,_answerText->text());
newItem->setText(1,_answerValue->currentItem() == 1 ?i18n("True"):i18n("False"));
- newItem->setText(2,QString::number(_answerPoints->value()));
+ newItem->setText(2,TQString::number(_answerPoints->value()));
// reset values
newItem->setSelected(false);
@@ -150,7 +150,7 @@ void KControlAddEdit::slotRemoveAnswer()
/** Button Up */
void KControlAddEdit::slotMoveUpAnswer()
{
- QListViewItem *item = _listAnswers->currentItem();
+ TQListViewItem *item = _listAnswers->currentItem();
if (item && item->itemAbove())
item->itemAbove()->moveItem(item);
@@ -162,7 +162,7 @@ void KControlAddEdit::slotMoveUpAnswer()
/** Button Down */
void KControlAddEdit::slotMoveDownAnswer()
{
- QListViewItem *item = _listAnswers->currentItem();
+ TQListViewItem *item = _listAnswers->currentItem();
if (item)
item->moveItem(item->itemBelow());
@@ -171,7 +171,7 @@ void KControlAddEdit::slotMoveDownAnswer()
_buttonDown->setEnabled(item->itemBelow()!=0);
}
-void KControlAddEdit::slotAnswerSelected(QListViewItem *item)
+void KControlAddEdit::slotAnswerSelected(TQListViewItem *item)
{
if (!item)
return;
@@ -198,7 +198,7 @@ void KControlAddEdit::accept()
addQuestion();
configWrite();
- done( QDialog::Accepted );
+ done( TQDialog::Accepted );
}
/** Add question with form data */
@@ -213,7 +213,7 @@ void KControlAddEdit::addQuestion()
_keducaFile->setQuestion( FileRead::QF_EXPLAIN, _questionExplain->text() );
_keducaFile->clearAnswers();
- QListViewItem *item = _listAnswers->firstChild();
+ TQListViewItem *item = _listAnswers->firstChild();
while (item) {
_keducaFile->setAnswer(
item->text(0), // The Answer text
@@ -227,7 +227,7 @@ void KControlAddEdit::configRead()
{
KConfig *config = KGlobal::config();
config->setGroup("AddModify Window");
- QSize defaultSize(500,400);
+ TQSize defaultSize(500,400);
resize( config->readSizeEntry("Geometry", &defaultSize ) );
}
@@ -255,18 +255,18 @@ void KControlAddEdit::slotDataChanged()
/** Preview image */
-void KControlAddEdit::slotPreviewImage( const QString &text)
+void KControlAddEdit::slotPreviewImage( const TQString &text)
{
if( text.isEmpty() ) { _questionPreview->setText(""); _answerPreview->setText(""); return; }
- _questionPreview->setPixmap( QPixmap( text ) );
- _answerPreview->setPixmap( QPixmap( text ) );
+ _questionPreview->setPixmap( TQPixmap( text ) );
+ _answerPreview->setPixmap( TQPixmap( text ) );
}
/** show current Page */
-void KControlAddEdit::showPage(QWidget *page)
+void KControlAddEdit::showPage(TQWidget *page)
{
- QWizard::showPage(page);
+ TQWizard::showPage(page);
slotDataChanged();
if ( page == _pageQuestion ) {
diff --git a/keduca/keducabuilder/kcontroladdedit.h b/keduca/keducabuilder/kcontroladdedit.h
index d700ec43..3144f41e 100644
--- a/keduca/keducabuilder/kcontroladdedit.h
+++ b/keduca/keducabuilder/kcontroladdedit.h
@@ -37,12 +37,12 @@ class KControlAddEdit : public KControlAddEditBase {
Q_OBJECT
public:
- KControlAddEdit(QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0);
+ KControlAddEdit(TQWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0);
~KControlAddEdit();
/** Init keducaFile pointer and EditMode */
void init(FileRead *keducaFile, bool editMode);
/** show current Page */
- void showPage(QWidget *page);
+ void showPage(TQWidget *page);
private:
@@ -58,14 +58,14 @@ private:
void configWrite();
/** Read config settings */
void configRead();
- void setCurrentAnswerItem(QListViewItem *item);
+ void setCurrentAnswerItem(TQListViewItem *item);
void resetAnswerValues();
// Private attributes
/** Pointer to keduca of kcontrol page */
FileRead *_keducaFile;
/** The currently selected answer item, important for editing of the answer*/
- QListViewItem *_currentAnswerItem;
+ TQListViewItem *_currentAnswerItem;
/** Is a edit modify? */
bool _editMode;
@@ -73,7 +73,7 @@ private slots:
/** Accept changes */
void accept();
/** An Answer has been selected */
- void slotAnswerSelected(QListViewItem *item);
+ void slotAnswerSelected(TQListViewItem *item);
/** Remove answer */
void slotRemoveAnswer();
/** Button insert */
@@ -85,7 +85,7 @@ private slots:
/** Question or Answer data changed */
void slotDataChanged();
/** Preview image */
- void slotPreviewImage( const QString & );
+ void slotPreviewImage( const TQString & );
/** Change question type */
void slotQuestionTypeChanged( int index );
};
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;
}
diff --git a/keduca/keducabuilder/kcontrolheader.h b/keduca/keducabuilder/kcontrolheader.h
index 86752ae0..ff1e64ff 100644
--- a/keduca/keducabuilder/kcontrolheader.h
+++ b/keduca/keducabuilder/kcontrolheader.h
@@ -35,7 +35,7 @@ class KControlHeader : public KDialogBase {
Q_OBJECT
public:
- KControlHeader(FileRead *keducaFile, QWidget *parent=0, const char *name=0);
+ KControlHeader(FileRead *keducaFile, TQWidget *parent=0, const char *name=0);
~KControlHeader();
private:
@@ -45,7 +45,7 @@ private:
/** Keduca pointer */
FileRead *_keducaFile;
/** Title */
- QLineEdit *_headerTitle;
+ TQLineEdit *_headerTitle;
/** Header type */
KComboBox *_headerType;
/** Header category */
@@ -57,13 +57,13 @@ private:
/** Header picture */
KURLRequester *_headerPicture;
/** Header name */
- QLineEdit *_headerName;
+ TQLineEdit *_headerName;
/** Header email */
- QLineEdit *_headerEmail;
+ TQLineEdit *_headerEmail;
/** Header www */
- QLineEdit *_headerWWW;
+ TQLineEdit *_headerWWW;
/** Default categories */
- QStringList _defaultCategories;
+ TQStringList _defaultCategories;
// Private methods
diff --git a/keduca/keducabuilder/keducabuilder.cpp b/keduca/keducabuilder/keducabuilder.cpp
index 08487cc9..fa7da986 100644
--- a/keduca/keducabuilder/keducabuilder.cpp
+++ b/keduca/keducabuilder/keducabuilder.cpp
@@ -32,10 +32,10 @@
#include <kmessagebox.h>
#include <kprinter.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
static const char* const keducabuilder_data[] = {
"15 16 4 1",
@@ -60,7 +60,7 @@ static const char* const keducabuilder_data[] = {
".#############.",
"..............."};
-KEducaBuilder::KEducaBuilder(QWidget* parent, const char *name, WFlags f )
+KEducaBuilder::KEducaBuilder(TQWidget* parent, const char *name, WFlags f )
: KMainWindow(parent,name,f),
_nativeFormat("application/x-edu")
{
@@ -81,29 +81,29 @@ KEducaBuilder::~KEducaBuilder()
/** Init graphical interface */
void KEducaBuilder::init()
{
- QWidget *mainView = new QWidget(this, "mainview");
+ TQWidget *mainView = new TQWidget(this, "mainview");
- QVBoxLayout *form2Layout = new QVBoxLayout( mainView );
+ TQVBoxLayout *form2Layout = new TQVBoxLayout( mainView );
form2Layout->setSpacing( 2 );
form2Layout->setMargin( 0 );
- _split = new QSplitter( mainView );
- _split->setOrientation( QSplitter::Vertical );
+ _split = new TQSplitter( mainView );
+ _split->setOrientation( TQSplitter::Vertical );
_listAnswer = new KListBox( _split, "_listAnswer" );
- _listAnswer->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, _listAnswer->sizePolicy().hasHeightForWidth() ) );
- connect( _listAnswer, SIGNAL( highlighted(QListBoxItem *) ), this, SLOT( slotPreview(QListBoxItem *) ) );
- connect( _listAnswer, SIGNAL( doubleClicked(QListBoxItem *) ), this, SLOT( slotEditbyList(QListBoxItem *) ) );
+ _listAnswer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, _listAnswer->sizePolicy().hasHeightForWidth() ) );
+ connect( _listAnswer, TQT_SIGNAL( highlighted(TQListBoxItem *) ), this, TQT_SLOT( slotPreview(TQListBoxItem *) ) );
+ connect( _listAnswer, TQT_SIGNAL( doubleClicked(TQListBoxItem *) ), this, TQT_SLOT( slotEditbyList(TQListBoxItem *) ) );
- _preview = new QTextView( _split, "_preview" );
- _preview->setFrameShape( QTextView::NoFrame );
+ _preview = new TQTextView( _split, "_preview" );
+ _preview->setFrameShape( TQTextView::NoFrame );
_preview->setLineWidth( 1 );
form2Layout->addWidget( _split );
setCentralWidget( mainView );
if (!initialGeometrySet())
- resize( QSize(500, 400).expandedTo(minimumSizeHint()));
+ resize( TQSize(500, 400).expandedTo(minimumSizeHint()));
setupGUI( ToolBar | Keys | StatusBar | Create, "keducabuilderui.rc" );
setAutoSaveSettings();
}
@@ -111,21 +111,21 @@ void KEducaBuilder::init()
/** Init menu bar settings */
void KEducaBuilder::initMenuBar()
{
- KStdAction::openNew(this, SLOT( slotFileOpenNew() ), actionCollection());
- KStdAction::open (this, SLOT( slotFileOpen() ), actionCollection());
- (void)new KAction(i18n("Open &Gallery..."), 0, 0, this, SLOT( slotGallery() ), actionCollection(), "open_gallery");
- _recentFiles = KStdAction::openRecent(this, SLOT ( slotFileOpenURL(const KURL &)), actionCollection());
- KStdAction::save (this, SLOT( slotFileSave() ), actionCollection());
- KStdAction::saveAs (this, SLOT( slotFileSaveAs() ), actionCollection());
- KStdAction::print (this, SLOT( slotFilePrint() ), actionCollection());
- (void)new KAction(i18n("Document Info"), "info", 0, this, SLOT( slotHeader() ), actionCollection(), "info_doc");
- KStdAction::quit(this, SLOT( close() ), actionCollection());
-
- (void)new KAction(i18n("&Add..."), "addquestion", 0, this, SLOT( slotAdd() ), actionCollection(), "question_add");
- (void)new KAction(i18n("&Edit..."), "editquestion", 0, this, SLOT( slotEdit() ), actionCollection(), "question_edit");
- (void)new KAction(i18n("&Remove"), "delquestion", 0, this, SLOT( slotRemove() ), actionCollection(), "question_remove");
- (void)new KAction(i18n("&Up"), "up", 0, this, SLOT( slotUp() ), actionCollection(), "question_up");
- (void)new KAction(i18n("&Down"), "down", 0, this, SLOT( slotDown() ), actionCollection(), "question_down");
+ KStdAction::openNew(this, TQT_SLOT( slotFileOpenNew() ), actionCollection());
+ KStdAction::open (this, TQT_SLOT( slotFileOpen() ), actionCollection());
+ (void)new KAction(i18n("Open &Gallery..."), 0, 0, this, TQT_SLOT( slotGallery() ), actionCollection(), "open_gallery");
+ _recentFiles = KStdAction::openRecent(this, TQT_SLOT ( slotFileOpenURL(const KURL &)), actionCollection());
+ KStdAction::save (this, TQT_SLOT( slotFileSave() ), actionCollection());
+ KStdAction::saveAs (this, TQT_SLOT( slotFileSaveAs() ), actionCollection());
+ KStdAction::print (this, TQT_SLOT( slotFilePrint() ), actionCollection());
+ (void)new KAction(i18n("Document Info"), "info", 0, this, TQT_SLOT( slotHeader() ), actionCollection(), "info_doc");
+ KStdAction::quit(this, TQT_SLOT( close() ), actionCollection());
+
+ (void)new KAction(i18n("&Add..."), "addquestion", 0, this, TQT_SLOT( slotAdd() ), actionCollection(), "question_add");
+ (void)new KAction(i18n("&Edit..."), "editquestion", 0, this, TQT_SLOT( slotEdit() ), actionCollection(), "question_edit");
+ (void)new KAction(i18n("&Remove"), "delquestion", 0, this, TQT_SLOT( slotRemove() ), actionCollection(), "question_remove");
+ (void)new KAction(i18n("&Up"), "up", 0, this, TQT_SLOT( slotUp() ), actionCollection(), "question_up");
+ (void)new KAction(i18n("&Down"), "down", 0, this, TQT_SLOT( slotDown() ), actionCollection(), "question_down");
}
/** Delete current document and start new */
@@ -148,7 +148,7 @@ void KEducaBuilder::slotFileOpenNew()
/** Open new document. */
void KEducaBuilder::slotFileOpen()
{
- KURL url = KFileDialog::getOpenURL( QString::null, _nativeFormat, this, i18n("Open Educa File") );
+ KURL url = KFileDialog::getOpenURL( TQString::null, _nativeFormat, this, i18n("Open Educa File") );
if( !url.isEmpty() )
slotFileOpenURL( url );
@@ -160,7 +160,7 @@ void KEducaBuilder::slotFileOpenURL( const KURL &url )
if (!currentFileMayBeReplaced())
return;
- QPixmap image0( ( const char** ) keducabuilder_data );
+ TQPixmap image0( ( const char** ) keducabuilder_data );
delete _keducaFile;
_keducaFile = new FileRead();
if( !_keducaFile->openFile(url) ) { return; }
@@ -177,10 +177,10 @@ void KEducaBuilder::slotFileOpenURL( const KURL &url )
}
/** Item select */
-void KEducaBuilder::slotPreview( QListBoxItem *item )
+void KEducaBuilder::slotPreview( TQListBoxItem *item )
{
// bool match = false;
- QString tmpListanswer;
+ TQString tmpListanswer;
// FIND THE SELECT RECORD
if( !item ) return;
@@ -318,7 +318,7 @@ bool KEducaBuilder::queryClose ()
/** Add question */
void KEducaBuilder::slotAdd()
{
- QPixmap image0( ( const char** ) keducabuilder_data );
+ TQPixmap image0( ( const char** ) keducabuilder_data );
KControlAddEdit edit(this);
edit.init( _keducaFile, false );
@@ -334,7 +334,7 @@ void KEducaBuilder::slotEdit()
{
if( _listAnswer->currentItem() == -1 ) return;
- QPixmap image0( ( const char** ) keducabuilder_data );
+ TQPixmap image0( ( const char** ) keducabuilder_data );
KControlAddEdit edit(this);
edit.init( _keducaFile, true );
@@ -359,10 +359,10 @@ void KEducaBuilder::slotUp()
int current = _listAnswer->currentItem();
if( current < 1 ) return;
- QPixmap image0( ( const char** ) keducabuilder_data );
+ TQPixmap image0( ( const char** ) keducabuilder_data );
_keducaFile->recordSwap( true );
- QString tmpString = _listAnswer->text( current-1 );
+ TQString tmpString = _listAnswer->text( current-1 );
_listAnswer->changeItem( image0, _listAnswer->text( current ), current-1 );
_listAnswer->changeItem( image0, tmpString, current );
_listAnswer->setCurrentItem( current-1 );
@@ -374,10 +374,10 @@ void KEducaBuilder::slotDown()
int current = _listAnswer->currentItem();
if( current == -1 || current == (signed)(_listAnswer->count()-1) ) return;
- QPixmap image0( ( const char** ) keducabuilder_data );
+ TQPixmap image0( ( const char** ) keducabuilder_data );
_keducaFile->recordSwap( true );
- QString tmpString = _listAnswer->text( current+1 );
+ TQString tmpString = _listAnswer->text( current+1 );
_listAnswer->changeItem( image0, _listAnswer->text( current ), current+1 );
_listAnswer->changeItem( image0, tmpString, current );
_listAnswer->setCurrentItem( current+1 );
@@ -406,22 +406,22 @@ bool KEducaBuilder::fileSaveAs()
{
if( !checkSave() ) return false;
- QCheckBox *saveCompressedCheckBox = new QCheckBox( i18n( "Compress the file" ), 0 );
+ TQCheckBox *saveCompressedCheckBox = new TQCheckBox( i18n( "Compress the file" ), 0 );
saveCompressedCheckBox->setChecked( true );
- KFileDialog *dialog=new KFileDialog(QString::null, QString::null, this, "file dialog", true, saveCompressedCheckBox);
+ KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, this, "file dialog", true, saveCompressedCheckBox);
dialog->setCaption( i18n("Save Document As") );
dialog->setKeepLocation( true );
dialog->setOperationMode( KFileDialog::Saving );
- QStringList mimeFilter(_nativeFormat);
+ TQStringList mimeFilter(_nativeFormat);
dialog->setMimeFilter( mimeFilter, _nativeFormat );
KURL newURL;
- QString outputFormat (_nativeFormat);
+ TQString outputFormat (_nativeFormat);
bool bOk;
do {
bOk=true;
- if(dialog->exec()==QDialog::Accepted) {
+ if(dialog->exec()==TQDialog::Accepted) {
newURL=dialog->selectedURL();
outputFormat=dialog->currentMimeFilter();
}
@@ -437,10 +437,10 @@ bool KEducaBuilder::fileSaveAs()
break;
}
- if ( QFileInfo( newURL.path() ).extension().isEmpty() ) {
+ if ( TQFileInfo( newURL.path() ).extension().isEmpty() ) {
// No more extensions in filters. We need to get it from the mimetype.
KMimeType::Ptr mime = KMimeType::mimeType( outputFormat );
- QString extension = mime->property( "X-KDE-NativeExtension" ).toString();
+ TQString extension = mime->property( "X-KDE-NativeExtension" ).toString();
kdDebug() << "KEducaBuilder::slotFileSaveAs outputFormat=" << outputFormat << " extension=" << extension << endl;
newURL.setPath( newURL.path() + extension );
}
@@ -482,21 +482,21 @@ void KEducaBuilder::slotFilePrint()
{
KPrinter *printer = new KPrinter();
- QString file = _keducaFile->getCurrentURL().fileName();
+ TQString file = _keducaFile->getCurrentURL().fileName();
if (file.isEmpty())
file = i18n("Test");
if(printer->setup(this, i18n("Print %1").arg(file)))
{
- QPaintDeviceMetrics metrics(printer);
- QPainter p;
+ TQPaintDeviceMetrics metrics(printer);
+ TQPainter p;
const int margin=20;
int yPos=0;
- QString text;
+ TQString text;
p.begin(printer);
- p.setFont( QFont(font().family(), 12, QFont::Bold) );
- QFontMetrics fm = p.fontMetrics();
+ p.setFont( TQFont(font().family(), 12, TQFont::Bold) );
+ TQFontMetrics fm = p.fontMetrics();
_keducaFile->recordFirst();
while(!_keducaFile->recordEOF())
@@ -533,7 +533,7 @@ bool KEducaBuilder::checkSave()
_keducaFile->getHeader("level").isEmpty() ||
_keducaFile->getHeader("language").isEmpty() )
{
- if (KMessageBox::warningContinueCancel(this, i18n("Unable to save file.\n\nYou must complete the Document Info\n(Only the description is necessary)"), QString::null, i18n("Complete Document Info..."))
+ if (KMessageBox::warningContinueCancel(this, i18n("Unable to save file.\n\nYou must complete the Document Info\n(Only the description is necessary)"), TQString::null, i18n("Complete Document Info..."))
== KMessageBox::Continue) {
if (slotHeader()!=KControlHeader::Accepted)
return false;
@@ -544,7 +544,7 @@ bool KEducaBuilder::checkSave()
if( _listAnswer->count() < 1 )
{
if (KMessageBox::warningContinueCancel(this, i18n("Unable to save file.\n\nYou must insert a question."),
- QString::null, i18n("Insert Question"))==KMessageBox::Continue)
+ TQString::null, i18n("Insert Question"))==KMessageBox::Continue)
slotAdd();
else
return false;
@@ -582,7 +582,7 @@ void KEducaBuilder::initGallery(const KURL &urlFile)
if( !urlFile.url().isEmpty() )
galleries.putURL( urlFile );
- if( galleries.exec() == QDialog::Accepted )
+ if( galleries.exec() == TQDialog::Accepted )
slotFileOpenURL( galleries.getURL() );
}
@@ -593,7 +593,7 @@ void KEducaBuilder::slotGallery()
}
/** Double click in list, edit question */
-void KEducaBuilder::slotEditbyList(QListBoxItem *item)
+void KEducaBuilder::slotEditbyList(TQListBoxItem *item)
{
if( item )
slotEdit();
diff --git a/keduca/keducabuilder/keducabuilder.h b/keduca/keducabuilder/keducabuilder.h
index 74c5eb58..c3a736a7 100644
--- a/keduca/keducabuilder/keducabuilder.h
+++ b/keduca/keducabuilder/keducabuilder.h
@@ -25,8 +25,8 @@
#include <klistbox.h>
#include <kaction.h>
-#include <qtextview.h>
-#include <qsplitter.h>
+#include <tqtextview.h>
+#include <tqsplitter.h>
/**Main control documents
* The Editor. This is the new main window of KEduca.
@@ -38,7 +38,7 @@ class KEducaBuilder : public KMainWindow {
Q_OBJECT
public:
- KEducaBuilder(QWidget* parent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose);
+ KEducaBuilder(TQWidget* parent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose);
~KEducaBuilder();
/** start a dialog that asks the user what he wants to do to start*/
bool startChooser();
@@ -79,12 +79,12 @@ private:
/** List of answers */
KListBox *_listAnswer;
/** Preview */
- QTextView *_preview;
+ TQTextView *_preview;
/** Main splitter */
- QSplitter *_split;
+ TQSplitter *_split;
/** I open a file */
bool _isOpenFile;
- QString _nativeFormat;
+ TQString _nativeFormat;
public slots:
/** Open new file */
@@ -96,7 +96,7 @@ private slots:
/** Open new document. */
void slotFileOpen();
/** Item select */
- void slotPreview( QListBoxItem *item );
+ void slotPreview( TQListBoxItem *item );
/** Close the window */
bool queryClose();
/** Edit question */
@@ -120,7 +120,7 @@ private slots:
/** Init Gallery */
void slotGallery();
/** Double click in list, edit question */
- void slotEditbyList(QListBoxItem *item);
+ void slotEditbyList(TQListBoxItem *item);
};
#endif
diff --git a/keduca/keducabuilder/keducaeditorstartdialog.cpp b/keduca/keducabuilder/keducaeditorstartdialog.cpp
index 88cf9305..8528b6ba 100644
--- a/keduca/keducabuilder/keducaeditorstartdialog.cpp
+++ b/keduca/keducabuilder/keducaeditorstartdialog.cpp
@@ -14,8 +14,8 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kdebug.h>
#include <kurlrequester.h>
@@ -42,17 +42,17 @@ KEducaEditorStartDialog::KEducaEditorStartDialog(KEducaBuilder * parent, const c
// setup connections
urlRequester->setFilter( "application/x-edu");
- connect( startChoiceBtnGrp, SIGNAL( clicked(int) ),
- this, SLOT( slotChoiceChanged(int) ) );
+ connect( startChoiceBtnGrp, TQT_SIGNAL( clicked(int) ),
+ this, TQT_SLOT( slotChoiceChanged(int) ) );
}
/** based on code in kaction.cpp
*/
void KEducaEditorStartDialog::buildRecentFilesList()
{
- QString key;
- QString value;
- QString oldGroup;
+ TQString key;
+ TQString value;
+ TQString oldGroup;
KConfig *config = KGlobal::config();
oldGroup = config->group();
@@ -62,8 +62,8 @@ void KEducaEditorStartDialog::buildRecentFilesList()
// read file list
for( unsigned int i = 1 ; i <= _maxRecentDocumentItems ; i++ )
{
- key = QString( "File%1" ).arg( i );
- value = config->readEntry( key, QString::null );
+ key = TQString( "File%1" ).arg( i );
+ value = config->readEntry( key, TQString::null );
if (!value.isNull())
recentDocumentCB->insertURL( KURL(value) );
diff --git a/keduca/keducabuilder/klangcombo.cpp b/keduca/keducabuilder/klangcombo.cpp
index ebedd9dd..1d86c09e 100644
--- a/keduca/keducabuilder/klangcombo.cpp
+++ b/keduca/keducabuilder/klangcombo.cpp
@@ -31,21 +31,21 @@ KLanguageCombo::~KLanguageCombo ()
{
}
-KLanguageCombo::KLanguageCombo (QWidget * parent, const char *name)
+KLanguageCombo::KLanguageCombo (TQWidget * parent, const char *name)
: KTagComboBox(parent, name)
{
}
-void KLanguageCombo::insertLanguage(const QString& path, const QString& name, const QString& sub, const QString &submenu)
+void KLanguageCombo::insertLanguage(const TQString& path, const TQString& name, const TQString& sub, const TQString &submenu)
{
- QString output = name + QString::fromLatin1(" (") + path + QString::fromLatin1(")");
- QPixmap flag(locate("locale", sub + path + QString::fromLatin1("/flag.png")));
- insertItem(QIconSet(flag), output, path, submenu);
+ TQString output = name + TQString::fromLatin1(" (") + path + TQString::fromLatin1(")");
+ TQPixmap flag(locate("locale", sub + path + TQString::fromLatin1("/flag.png")));
+ insertItem(TQIconSet(flag), output, path, submenu);
}
-void KLanguageCombo::changeLanguage(const QString& name, int i)
+void KLanguageCombo::changeLanguage(const TQString& name, int i)
{
if (i < 0 || i >= count()) return;
- QString output = name + QString::fromLatin1(" (") + tag(i) + QString::fromLatin1(")");
+ TQString output = name + TQString::fromLatin1(" (") + tag(i) + TQString::fromLatin1(")");
changeItem(output, i);
}
diff --git a/keduca/keducabuilder/klangcombo.h b/keduca/keducabuilder/klangcombo.h
index 4c9fb801..2aca5753 100644
--- a/keduca/keducabuilder/klangcombo.h
+++ b/keduca/keducabuilder/klangcombo.h
@@ -37,11 +37,11 @@ class KLanguageCombo : public KTagComboBox
Q_OBJECT
public:
- KLanguageCombo(QWidget *parent=0, const char *name=0);
+ KLanguageCombo(TQWidget *parent=0, const char *name=0);
~KLanguageCombo();
- void insertLanguage(const QString& path, const QString& name, const QString& sub = QString::null, const QString &submenu = QString::null);
- void changeLanguage(const QString& name, int i);
+ void insertLanguage(const TQString& path, const TQString& name, const TQString& sub = TQString::null, const TQString &submenu = TQString::null);
+ void changeLanguage(const TQString& name, int i);
};
#endif
diff --git a/keduca/keducabuilder/ktagcombobox.cpp b/keduca/keducabuilder/ktagcombobox.cpp
index 9b7e969e..6d8951ec 100644
--- a/keduca/keducabuilder/ktagcombobox.cpp
+++ b/keduca/keducabuilder/ktagcombobox.cpp
@@ -22,8 +22,8 @@
*/
#define INCLUDE_MENUITEM_DEF 1
-#include <qpainter.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
@@ -36,23 +36,23 @@ KTagComboBox::~KTagComboBox ()
delete _tags;
}
-KTagComboBox::KTagComboBox (QWidget * parent, const char *name)
- : QComboBox(parent, name)
+KTagComboBox::KTagComboBox (TQWidget * parent, const char *name)
+ : TQComboBox(parent, name)
{
- _popup = new QPopupMenu(this);
+ _popup = new TQPopupMenu(this);
_tags = new QStringList;
- connect( _popup, SIGNAL(activated(int)),
- SLOT(internalActivate(int)) );
- connect( _popup, SIGNAL(highlighted(int)),
- SLOT(internalHighlight(int)) );
+ connect( _popup, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(internalActivate(int)) );
+ connect( _popup, TQT_SIGNAL(highlighted(int)),
+ TQT_SLOT(internalHighlight(int)) );
}
void KTagComboBox::popupMenu()
{
- _popup->popup( mapToGlobal( QPoint(0,0) ), _current );
+ _popup->popup( mapToGlobal( TQPoint(0,0) ), _current );
}
-void KTagComboBox::keyPressEvent( QKeyEvent *e )
+void KTagComboBox::keyPressEvent( TQKeyEvent *e )
{
int c;
@@ -74,7 +74,7 @@ void KTagComboBox::keyPressEvent( QKeyEvent *e )
emit activated( c );
}
-void KTagComboBox::mousePressEvent( QMouseEvent * )
+void KTagComboBox::mousePressEvent( TQMouseEvent * )
{
popupMenu();
}
@@ -103,14 +103,14 @@ int KTagComboBox::count() const
return _tags->count();
}
-static inline QPopupMenu *checkInsertIndex(QPopupMenu *popup, const QStringList *tags, const QString &submenu, int *index)
+static inline TQPopupMenu *checkInsertIndex(TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu, int *index)
{
int pos = tags->findIndex(submenu);
- QPopupMenu *pi = 0;
+ TQPopupMenu *pi = 0;
if (pos != -1)
{
- QMenuItem *p = popup->findItem(popup->idAt(pos));
+ TQMenuItem *p = popup->findItem(popup->idAt(pos));
pi = p?p->popup():0;
}
if (!pi) pi = popup;
@@ -121,82 +121,82 @@ static inline QPopupMenu *checkInsertIndex(QPopupMenu *popup, const QStringList
return pi;
}
-void KTagComboBox::insertItem(const QIconSet& icon, const QString &text, const QString &tag, const QString &submenu, int index )
+void KTagComboBox::insertItem(const TQIconSet& icon, const TQString &text, const TQString &tag, const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
+ TQPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
pi->insertItem(icon, text, count(), index);
_tags->append(tag);
}
-void KTagComboBox::insertItem(const QString &text, const QString &tag, const QString &submenu, int index )
+void KTagComboBox::insertItem(const TQString &text, const TQString &tag, const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
+ TQPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
pi->insertItem(text, count(), index);
_tags->append(tag);
}
-void KTagComboBox::insertSeparator(const QString &submenu, int index)
+void KTagComboBox::insertSeparator(const TQString &submenu, int index)
{
- QPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
+ TQPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
pi->insertSeparator(index);
- _tags->append(QString::null);
+ _tags->append(TQString::null);
}
-void KTagComboBox::insertSubmenu(const QString &text, const QString &tag, const QString &submenu, int index)
+void KTagComboBox::insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu, int index)
{
- QPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
- QPopupMenu *p = new QPopupMenu(pi);
+ TQPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index);
+ TQPopupMenu *p = new TQPopupMenu(pi);
pi->insertItem(text, p, count(), index);
_tags->append(tag);
- connect( p, SIGNAL(activated(int)),
- SLOT(internalActivate(int)) );
- connect( p, SIGNAL(highlighted(int)),
- SLOT(internalHighlight(int)) );
+ connect( p, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(internalActivate(int)) );
+ connect( p, TQT_SIGNAL(highlighted(int)),
+ TQT_SLOT(internalHighlight(int)) );
}
-void KTagComboBox::changeItem( const QString &text, int index )
+void KTagComboBox::changeItem( const TQString &text, int index )
{
_popup->changeItem( text, index);
if (index == _current)
repaint();
}
-void KTagComboBox::paintEvent( QPaintEvent * ev)
+void KTagComboBox::paintEvent( TQPaintEvent * ev)
{
- QComboBox::paintEvent(ev);
+ TQComboBox::paintEvent(ev);
- QPainter p (this);
+ TQPainter p (this);
// Text
- QRect clip(2, 2, width() - 4, height() - 4);
+ TQRect clip(2, 2, width() - 4, height() - 4);
if ( hasFocus())
p.setPen( colorGroup().highlightedText() );
p.drawText(clip, AlignCenter | SingleLine, _popup->text( _current ));
// Icon
- QIconSet *icon = _popup->iconSet( _current );
+ TQIconSet *icon = _popup->iconSet( _current );
if (icon) {
- QPixmap pm = icon->pixmap();
+ TQPixmap pm = icon->pixmap();
p.drawPixmap( 4, (height()-pm.height())/2, pm );
}
}
-bool KTagComboBox::containsTag( const QString &str ) const
+bool KTagComboBox::containsTag( const TQString &str ) const
{
return _tags->contains(str) > 0;
}
-QString KTagComboBox::currentTag() const
+TQString KTagComboBox::currentTag() const
{
return *_tags->at(currentItem());
}
-QString KTagComboBox::tag(int i) const
+TQString KTagComboBox::tag(int i) const
{
if (i < 0 || i >= count())
{
kdDebug() << "KTagComboBox::tag(), unknown tag " << i << endl;
- return QString::null;
+ return TQString::null;
}
return *_tags->at(i);
}
@@ -213,7 +213,7 @@ void KTagComboBox::setCurrentItem(int i)
repaint();
}
-void KTagComboBox::setCurrentItem(const QString &code)
+void KTagComboBox::setCurrentItem(const TQString &code)
{
int i = _tags->findIndex(code);
if (code.isNull())
@@ -222,8 +222,8 @@ void KTagComboBox::setCurrentItem(const QString &code)
setCurrentItem(i);
}
-void KTagComboBox::setFont( const QFont &font )
+void KTagComboBox::setFont( const TQFont &font )
{
- QComboBox::setFont( font );
+ TQComboBox::setFont( font );
_popup->setFont( font );
}
diff --git a/keduca/keducabuilder/ktagcombobox.h b/keduca/keducabuilder/ktagcombobox.h
index 099c6561..1644d6a7 100644
--- a/keduca/keducabuilder/ktagcombobox.h
+++ b/keduca/keducabuilder/ktagcombobox.h
@@ -25,14 +25,14 @@
#ifndef __KTAGCOMBOBOX_H__
#define __KTAGCOMBOBOX_H__
-#include <qcombobox.h>
-#include <qiconset.h>
+#include <tqcombobox.h>
+#include <tqiconset.h>
class QPopupMenu;
class QStringList;
/*
* This class should be just like qcombobox, but it should be possible
- * to have have a QIconSet for each entry, and each entry should have a tag.
+ * to have have a TQIconSet for each entry, and each entry should have a tag.
*
* It has also support for sub menues.
*/
@@ -41,14 +41,14 @@ class KTagComboBox : public QComboBox
Q_OBJECT
public:
- KTagComboBox(QWidget *parent=0, const char *name=0);
+ KTagComboBox(TQWidget *parent=0, const char *name=0);
~KTagComboBox();
- void insertItem(const QIconSet& icon, const QString &text, const QString &tag, const QString &submenu = QString::null, int index=-1 );
- void insertItem(const QString &text, const QString &tag, const QString &submenu = QString::null, int index=-1 );
- void insertSeparator(const QString &submenu = QString::null, int index=-1 );
- void insertSubmenu(const QString &text, const QString &tag, const QString &submenu = QString::null, int index=-1);
- void changeItem( const QString &text, int index );
+ void insertItem(const TQIconSet& icon, const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1 );
+ void insertItem(const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1 );
+ void insertSeparator(const TQString &submenu = TQString::null, int index=-1 );
+ void insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1);
+ void changeItem( const TQString &text, int index );
int count() const;
void clear();
@@ -56,19 +56,19 @@ public:
/*
* Tag of the selected item
*/
- QString currentTag() const;
- QString tag ( int i ) const;
- bool containsTag (const QString &str ) const;
+ TQString currentTag() const;
+ TQString tag ( int i ) const;
+ bool containsTag (const TQString &str ) const;
/*
* Set the current item
*/
int currentItem() const;
void setCurrentItem(int i);
- void setCurrentItem(const QString &code);
+ void setCurrentItem(const TQString &code);
// widget stuff
- virtual void setFont( const QFont & );
+ virtual void setFont( const TQFont & );
signals:
void activated( int index );
@@ -79,15 +79,15 @@ private slots:
void internalHighlight( int );
protected:
- void paintEvent( QPaintEvent * );
- void mousePressEvent( QMouseEvent * );
- void keyPressEvent( QKeyEvent *e );
+ void paintEvent( TQPaintEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void keyPressEvent( TQKeyEvent *e );
void popupMenu();
private:
// work space for the new class
- QStringList *_tags;
- QPopupMenu *_popup;
+ TQStringList *_tags;
+ TQPopupMenu *_popup;
int _current;
};
diff --git a/keduca/keducabuilder/main.cpp b/keduca/keducabuilder/main.cpp
index 93a49cdf..00032f08 100644
--- a/keduca/keducabuilder/main.cpp
+++ b/keduca/keducabuilder/main.cpp
@@ -20,7 +20,7 @@
#include <kaboutdata.h>
#include <kdebug.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "keducabuilder.h"
static const char description[] = I18N_NOOP("Form-based tests and exams builder");
@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
keducaEditor->show();
if ( args->count() > 0 ){
- if( QFileInfo( KURL(args->url(0)).url() ).extension() == "edugallery" )
+ if( TQFileInfo( KURL(args->url(0)).url() ).extension() == "edugallery" )
keducaEditor->initGallery( args->url(0) );
else
keducaEditor->slotFileOpenURL( args->url(0) );