diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
commit | a374efce3a207b39514be3c52264091400ce297e (patch) | |
tree | 77bdf654b55826d4f59b53a5621310206bcaead1 /keduca/keducabuilder | |
parent | f81a494f3957d5cf38c787973415597941934727 (diff) | |
download | tdeedu-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')
-rw-r--r-- | keduca/keducabuilder/kcontroladdedit.cpp | 40 | ||||
-rw-r--r-- | keduca/keducabuilder/kcontroladdedit.h | 5 | ||||
-rw-r--r-- | keduca/keducabuilder/kcontroladdeditbase.ui | 162 | ||||
-rw-r--r-- | keduca/keducabuilder/kcontrolheader.cpp | 70 | ||||
-rw-r--r-- | keduca/keducabuilder/kcontrolheader.h | 3 | ||||
-rw-r--r-- | keduca/keducabuilder/kcontrolheaderbase.ui | 82 | ||||
-rw-r--r-- | keduca/keducabuilder/keducabuilder.cpp | 86 | ||||
-rw-r--r-- | keduca/keducabuilder/keducabuilder.h | 3 | ||||
-rw-r--r-- | keduca/keducabuilder/keducaeditorstartdialog.cpp | 8 | ||||
-rw-r--r-- | keduca/keducabuilder/keducaeditorstartdialog.h | 3 | ||||
-rw-r--r-- | keduca/keducabuilder/keducaeditorstartdialogbase.ui | 36 | ||||
-rw-r--r-- | keduca/keducabuilder/klangcombo.cpp | 12 | ||||
-rw-r--r-- | keduca/keducabuilder/klangcombo.h | 7 | ||||
-rw-r--r-- | keduca/keducabuilder/ktagcombobox.cpp | 26 | ||||
-rw-r--r-- | keduca/keducabuilder/ktagcombobox.h | 15 |
15 files changed, 282 insertions, 276 deletions
diff --git a/keduca/keducabuilder/kcontroladdedit.cpp b/keduca/keducabuilder/kcontroladdedit.cpp index f8b60562..c6182e8d 100644 --- a/keduca/keducabuilder/kcontroladdedit.cpp +++ b/keduca/keducabuilder/kcontroladdedit.cpp @@ -27,12 +27,12 @@ #include <klistview.h> //#include <.h> -// Qt includes +// TQt includes #include <tqlabel.h> #include <tqtextedit.h> -KControlAddEdit::KControlAddEdit(TQWidget *parent, const char *name, bool modal, WFlags f) - : KControlAddEditBase(parent, name, modal, f), +KControlAddEdit::KControlAddEdit(TQWidget *tqparent, const char *name, bool modal, WFlags f) + : KControlAddEditBase(tqparent, name, modal, f), _currentAnswerItem(0) { configRead(); @@ -72,19 +72,19 @@ void KControlAddEdit::init(FileRead *keducaFile, bool edit) /** Fill page of current record */ void KControlAddEdit::fillPage() { - _questionText->setText( _keducaFile->getQuestion( FileRead::QF_TEXT ) ); - if( !_keducaFile->getQuestion( FileRead::QF_PICTURE ).isEmpty() ) + _questionText->setText( _keducaFile->getQuestion( FileRead::TQF_TEXT ) ); + if( !_keducaFile->getQuestion( FileRead::TQF_PICTURE ).isEmpty() ) { - _questionPreview->setPixmap(_keducaFile->getQuestion(FileRead::QF_PICTURE)); - _answerPreview->setPixmap(_keducaFile->getQuestion(FileRead::QF_PICTURE)); - _questionPicture->setURL( _keducaFile->getQuestion( FileRead::QF_PICTURE ) ); + _questionPreview->setPixmap(_keducaFile->getQuestion(FileRead::TQF_PICTURE)); + _answerPreview->setPixmap(_keducaFile->getQuestion(FileRead::TQF_PICTURE)); + _questionPicture->setURL( _keducaFile->getQuestion( FileRead::TQF_PICTURE ) ); } - _questionType->setCurrentItem( _keducaFile->getQuestionInt( FileRead::QF_TYPE )-1 ); + _questionType->setCurrentItem( _keducaFile->getQuestionInt( FileRead::TQF_TYPE )-1 ); slotQuestionTypeChanged( _questionType->currentItem() ); - _questionPoint->setValue( _keducaFile->getQuestionInt( FileRead::QF_POINTS ) ); - _questionTip->setText( _keducaFile->getQuestion( FileRead::QF_TIP ) ); - _questionExplain->setText( _keducaFile->getQuestion( FileRead::QF_EXPLAIN ) ); - _questionTime->setValue( _keducaFile->getQuestionInt( FileRead::QF_TIME ) ); + _questionPoint->setValue( _keducaFile->getQuestionInt( FileRead::TQF_POINTS ) ); + _questionTip->setText( _keducaFile->getQuestion( FileRead::TQF_TIP ) ); + _questionExplain->setText( _keducaFile->getQuestion( FileRead::TQF_EXPLAIN ) ); + _questionTime->setValue( _keducaFile->getQuestionInt( FileRead::TQF_TIME ) ); _listAnswers->clear(); _keducaFile->recordAnswerFirst(); @@ -204,13 +204,13 @@ void KControlAddEdit::accept() /** Add question with form data */ void KControlAddEdit::addQuestion() { - _keducaFile->setQuestion( FileRead::QF_TEXT, _questionText->text() ); - _keducaFile->setQuestion( FileRead::QF_TYPE, _questionType->currentItem()+1 ); - _keducaFile->setQuestion( FileRead::QF_PICTURE, _questionPicture->url() ); - _keducaFile->setQuestion( FileRead::QF_POINTS, _questionPoint->value() ); - _keducaFile->setQuestion( FileRead::QF_TIME, _questionTime->value() ); - _keducaFile->setQuestion( FileRead::QF_TIP, _questionTip->text() ); - _keducaFile->setQuestion( FileRead::QF_EXPLAIN, _questionExplain->text() ); + _keducaFile->setQuestion( FileRead::TQF_TEXT, _questionText->text() ); + _keducaFile->setQuestion( FileRead::TQF_TYPE, _questionType->currentItem()+1 ); + _keducaFile->setQuestion( FileRead::TQF_PICTURE, _questionPicture->url() ); + _keducaFile->setQuestion( FileRead::TQF_POINTS, _questionPoint->value() ); + _keducaFile->setQuestion( FileRead::TQF_TIME, _questionTime->value() ); + _keducaFile->setQuestion( FileRead::TQF_TIP, _questionTip->text() ); + _keducaFile->setQuestion( FileRead::TQF_EXPLAIN, _questionExplain->text() ); _keducaFile->clearAnswers(); TQListViewItem *item = _listAnswers->firstChild(); diff --git a/keduca/keducabuilder/kcontroladdedit.h b/keduca/keducabuilder/kcontroladdedit.h index cb93329e..fb867c23 100644 --- a/keduca/keducabuilder/kcontroladdedit.h +++ b/keduca/keducabuilder/kcontroladdedit.h @@ -21,7 +21,7 @@ #include "../libkeduca/fileread.h" #include "kcontroladdeditbase.h" -// Qt forward declarations +// TQt forward declarations class TQListViewItem; /**Add or edit questions @@ -35,9 +35,10 @@ class TQListViewItem; class KControlAddEdit : public KControlAddEditBase { Q_OBJECT + TQ_OBJECT public: - KControlAddEdit(TQWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); + KControlAddEdit(TQWidget *tqparent = 0, const char *name = 0, bool modal = true, WFlags f = 0); ~KControlAddEdit(); /** Init keducaFile pointer and EditMode */ void init(FileRead *keducaFile, bool editMode); diff --git a/keduca/keducabuilder/kcontroladdeditbase.ui b/keduca/keducabuilder/kcontroladdeditbase.ui index 0292edf2..af9df10a 100644 --- a/keduca/keducabuilder/kcontroladdeditbase.ui +++ b/keduca/keducabuilder/kcontroladdeditbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KControlAddEditBase</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>KControlAddEditBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -12,7 +12,7 @@ <height>480</height> </rect> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>_pageQuestion</cstring> </property> @@ -26,17 +26,17 @@ <property name="margin"> <number>0</number> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>125</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>125</width> <height>32767</height> @@ -55,17 +55,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>_questionPreview</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>100</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>100</width> <height>100</height> @@ -101,14 +101,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -130,7 +130,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -139,7 +139,7 @@ </spacer> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame5</cstring> </property> @@ -153,42 +153,42 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>&Question:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_questionText</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>&Type:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_questionType</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string>&Picture:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -220,80 +220,80 @@ <cstring>_questionType</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> <property name="text"> <string>P&oint:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_questionPoint</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> <property name="text"> <string>Ti&me:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_questionTime</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> <property name="text"> <string>T&ip:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_questionTip</cstring> </property> </widget> - <widget class="QLineEdit" row="5" column="1"> + <widget class="TQLineEdit" row="5" column="1"> <property name="name"> <cstring>_questionTip</cstring> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> <property name="text"> <string>&Explain:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_questionExplain</cstring> </property> </widget> - <widget class="QTextEdit" row="0" column="1"> + <widget class="TQTextEdit" row="0" column="1"> <property name="name"> <cstring>_questionText</cstring> </property> </widget> - <widget class="QTextEdit" row="6" column="1"> + <widget class="TQTextEdit" row="6" column="1"> <property name="name"> <cstring>_questionExplain</cstring> </property> </widget> - <widget class="QLayoutWidget" row="4" column="1"> + <widget class="TQLayoutWidget" row="4" column="1"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -314,7 +314,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>81</width> <height>20</height> @@ -323,9 +323,9 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="3" column="1"> + <widget class="TQLayoutWidget" row="3" column="1"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -346,7 +346,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>131</width> <height>20</height> @@ -359,7 +359,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>_pageAnswer</cstring> </property> @@ -373,17 +373,17 @@ <property name="margin"> <number>0</number> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame3_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>125</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>125</width> <height>32767</height> @@ -402,17 +402,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>_answerPreview</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>100</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>100</width> <height>100</height> @@ -448,14 +448,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -477,7 +477,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -486,7 +486,7 @@ </spacer> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame6</cstring> </property> @@ -500,17 +500,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -531,7 +531,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> @@ -540,48 +540,48 @@ </spacer> </hbox> </widget> - <widget class="QTextEdit" row="0" column="1"> + <widget class="TQTextEdit" row="0" column="1"> <property name="name"> <cstring>_answerText</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>&Answer:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_answerText</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> <property name="text"> <string>&Value:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>_answerValue</cstring> </property> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>False</string> @@ -598,14 +598,14 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3_2</cstring> </property> <property name="text"> <string>&Points:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -628,9 +628,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> @@ -677,15 +677,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_buttonInsert</cstring> </property> @@ -696,7 +696,7 @@ <string>&Add</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_buttonRemove</cstring> </property> @@ -717,14 +717,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_buttonUp</cstring> </property> @@ -735,7 +735,7 @@ <string>Move &Up</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_buttonDown</cstring> </property> @@ -756,7 +756,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -786,9 +786,9 @@ </connection> <connection> <sender>_questionPicture</sender> - <signal>urlSelected(const QString&)</signal> + <signal>urlSelected(const TQString&)</signal> <receiver>KControlAddEditBase</receiver> - <slot>slotPreviewImage(const QString&)</slot> + <slot>slotPreviewImage(const TQString&)</slot> </connection> <connection> <sender>_questionType</sender> @@ -822,9 +822,9 @@ </connection> <connection> <sender>_listAnswers</sender> - <signal>selectionChanged(QListViewItem*)</signal> + <signal>selectionChanged(TQListViewItem*)</signal> <receiver>KControlAddEditBase</receiver> - <slot>slotAnswerSelected(QListViewItem*)</slot> + <slot>slotAnswerSelected(TQListViewItem*)</slot> </connection> <connection> <sender>_answerText</sender> @@ -850,17 +850,17 @@ <tabstop>_questionTip</tabstop> <tabstop>_questionExplain</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="private" specifier="pure virtual">slotAddAnswer()</slot> <slot access="private" specifier="pure virtual">slotRemoveAnswer()</slot> <slot access="private" specifier="pure virtual">slotMoveUpAnswer()</slot> <slot access="private" specifier="pure virtual">slotMoveDownAnswer()</slot> - <slot access="private" specifier="pure virtual">slotPreviewImage(const QString &)</slot> + <slot access="private" specifier="pure virtual">slotPreviewImage(const TQString &)</slot> <slot access="private" specifier="pure virtual">slotQuestionTypeChanged(int index)</slot> <slot access="private" specifier="pure virtual">slotDataChanged()</slot> - <slot access="private" specifier="pure virtual">slotAnswerSelected(QListViewItem *)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> + <slot access="private" specifier="pure virtual">slotAnswerSelected(TQListViewItem *)</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> 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") ); diff --git a/keduca/keducabuilder/kcontrolheader.h b/keduca/keducabuilder/kcontrolheader.h index ff1e64ff..8370758d 100644 --- a/keduca/keducabuilder/kcontrolheader.h +++ b/keduca/keducabuilder/kcontrolheader.h @@ -33,9 +33,10 @@ class KControlHeader : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KControlHeader(FileRead *keducaFile, TQWidget *parent=0, const char *name=0); + KControlHeader(FileRead *keducaFile, TQWidget *tqparent=0, const char *name=0); ~KControlHeader(); private: diff --git a/keduca/keducabuilder/kcontrolheaderbase.ui b/keduca/keducabuilder/kcontrolheaderbase.ui index 04f2411b..86fedce7 100644 --- a/keduca/keducabuilder/kcontrolheaderbase.ui +++ b/keduca/keducabuilder/kcontrolheaderbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>MyDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>MyDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,17 +19,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>50</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>50</height> @@ -55,17 +55,17 @@ <property name="margin"> <number>2</number> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame4</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>125</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>125</width> <height>32767</height> @@ -84,7 +84,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -104,14 +104,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>60</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -121,7 +121,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -132,47 +132,47 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel11</cstring> </property> <property name="text"> <string>Title:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel9</cstring> </property> <property name="text"> <string>Language:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel10</cstring> </property> <property name="text"> <string>Category:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> <property name="text"> <string>Type:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -186,9 +186,9 @@ <cstring>_headerTitle</cstring> </property> </widget> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -209,21 +209,21 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel8</cstring> </property> <property name="text"> <string>Level:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -244,7 +244,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -255,14 +255,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>Default picture:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignJustify|AlignVCenter</set> </property> </widget> @@ -273,7 +273,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -284,14 +284,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string>Name:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -310,25 +310,25 @@ <cstring>_headerEmail</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> <property name="text"> <string>Web page:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>Email:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -344,7 +344,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>40</height> @@ -365,7 +365,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -389,14 +389,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -410,7 +410,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -459,7 +459,7 @@ <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/keduca/keducabuilder/keducabuilder.cpp b/keduca/keducabuilder/keducabuilder.cpp index fa7da986..93dbb334 100644 --- a/keduca/keducabuilder/keducabuilder.cpp +++ b/keduca/keducabuilder/keducabuilder.cpp @@ -60,8 +60,8 @@ static const char* const keducabuilder_data[] = { ".#############.", "..............."}; -KEducaBuilder::KEducaBuilder(TQWidget* parent, const char *name, WFlags f ) - : KMainWindow(parent,name,f), +KEducaBuilder::KEducaBuilder(TQWidget* tqparent, const char *name, WFlags f ) + : KMainWindow(tqparent,name,f), _nativeFormat("application/x-edu") { _keducaFile = new FileRead(); @@ -88,12 +88,12 @@ void KEducaBuilder::init() form2Layout->setMargin( 0 ); _split = new TQSplitter( mainView ); - _split->setOrientation( TQSplitter::Vertical ); + _split->setOrientation( Qt::Vertical ); _listAnswer = new KListBox( _split, "_listAnswer" ); - _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 *) ) ); + _listAnswer->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, _listAnswer->sizePolicy().hasHeightForWidth() ) ); + connect( _listAnswer, TQT_SIGNAL( highlighted(TQListBoxItem *) ), TQT_TQOBJECT(this), TQT_SLOT( slotPreview(TQListBoxItem *) ) ); + connect( _listAnswer, TQT_SIGNAL( doubleClicked(TQListBoxItem *) ), TQT_TQOBJECT(this), TQT_SLOT( slotEditbyList(TQListBoxItem *) ) ); _preview = new TQTextView( _split, "_preview" ); _preview->setFrameShape( TQTextView::NoFrame ); @@ -103,7 +103,7 @@ void KEducaBuilder::init() setCentralWidget( mainView ); if (!initialGeometrySet()) - resize( TQSize(500, 400).expandedTo(minimumSizeHint())); + resize( TQSize(500, 400).expandedTo(tqminimumSizeHint())); 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, 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"); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT( slotFileOpenNew() ), actionCollection()); + KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection()); + (void)new KAction(i18n("Open &Gallery..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT( slotGallery() ), actionCollection(), "open_gallery"); + _recentFiles = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT ( slotFileOpenURL(const KURL &)), actionCollection()); + KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ), actionCollection()); + KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ), actionCollection()); + KStdAction::print (TQT_TQOBJECT(this), TQT_SLOT( slotFilePrint() ), actionCollection()); + (void)new KAction(i18n("Document Info"), "info", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHeader() ), actionCollection(), "info_doc"); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection()); + + (void)new KAction(i18n("&Add..."), "addquestion", 0, TQT_TQOBJECT(this), TQT_SLOT( slotAdd() ), actionCollection(), "question_add"); + (void)new KAction(i18n("&Edit..."), "editquestion", 0, TQT_TQOBJECT(this), TQT_SLOT( slotEdit() ), actionCollection(), "question_edit"); + (void)new KAction(i18n("&Remove"), "delquestion", 0, TQT_TQOBJECT(this), TQT_SLOT( slotRemove() ), actionCollection(), "question_remove"); + (void)new KAction(i18n("&Up"), "up", 0, TQT_TQOBJECT(this), TQT_SLOT( slotUp() ), actionCollection(), "question_up"); + (void)new KAction(i18n("&Down"), "down", 0, TQT_TQOBJECT(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( TQString::null, _nativeFormat, this, i18n("Open Educa File") ); + KURL url = KFileDialog::getOpenURL( TQString(), _nativeFormat, this, i18n("Open Educa File") ); if( !url.isEmpty() ) slotFileOpenURL( url ); @@ -171,7 +171,7 @@ void KEducaBuilder::slotFileOpenURL( const KURL &url ) _keducaFile->recordFirst(); while( !_keducaFile->recordEOF() ) { - _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::QF_TEXT ) ); + _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::TQF_TEXT ) ); _keducaFile->recordNext(); } } @@ -199,7 +199,7 @@ void KEducaBuilder::slotPreview( TQListBoxItem *item ) tmpListanswer += "<TR>"; tmpListanswer += "<TD WIDTH=3% BGCOLOR="; _keducaFile->getAnswerValue() ? tmpListanswer += "#006b6b>" : tmpListanswer += "#b84747>"; - if( _keducaFile->getQuestionInt( FileRead::QF_TYPE ) == 3 ) + if( _keducaFile->getQuestionInt( FileRead::TQF_TYPE ) == 3 ) { tmpListanswer += "<FONT COLOR=#ffffff><b>" + _keducaFile->getAnswer( FileRead::AF_POINT ) @@ -214,40 +214,40 @@ void KEducaBuilder::slotPreview( TQListBoxItem *item ) }; tmpListanswer += "</TABLE>"; - if( !_keducaFile->getQuestion( FileRead::QF_PICTURE ).isEmpty() ) + if( !_keducaFile->getQuestion( FileRead::TQF_PICTURE ).isEmpty() ) { tmpListanswer += "<table><tr><td><img src="; tmpListanswer += _keducaFile->getPicture(); tmpListanswer += "></td>"; tmpListanswer += "<td align=right><b>" + i18n("Question Image") + "</b><hr>"; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_PICTURE ) + "</td></tr></table>"; + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_PICTURE ) + "</td></tr></table>"; }; - if( _keducaFile->getQuestionInt( FileRead::QF_POINTS ) > 0 ) + if( _keducaFile->getQuestionInt( FileRead::TQF_POINTS ) > 0 ) { tmpListanswer += "<p><b>" + i18n("Question point") + ":</b> "; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_POINTS ); + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_POINTS ); } - if( _keducaFile->getQuestionInt( FileRead::QF_TIME ) > 0 ) + if( _keducaFile->getQuestionInt( FileRead::TQF_TIME ) > 0 ) { tmpListanswer += "<p><b>"+i18n("Time")+":</b> "; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_TIME ); + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_TIME ); tmpListanswer += i18n(" seconds</p>"); } - if( !_keducaFile->getQuestion( FileRead::QF_TIP ).isEmpty() ) + if( !_keducaFile->getQuestion( FileRead::TQF_TIP ).isEmpty() ) { tmpListanswer += "<p><b>" + i18n("Tip") +":</b> "; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_TIP ); + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_TIP ); tmpListanswer += "</p>"; } - if( !_keducaFile->getQuestion( FileRead::QF_EXPLAIN ).isEmpty() ) + if( !_keducaFile->getQuestion( FileRead::TQF_EXPLAIN ).isEmpty() ) { tmpListanswer += "<p><b>" + i18n("Explain") + ":</b>" - + _keducaFile->getQuestion( FileRead::QF_EXPLAIN ) + + _keducaFile->getQuestion( FileRead::TQF_EXPLAIN ) + "</p>"; } @@ -284,7 +284,7 @@ bool KEducaBuilder::currentFileMayBeReplaced() int res = KMessageBox::warningYesNoCancel( widget(), // ask the user to save i18n( "The document \"%1\" has been modified.\n" - "Do you want to save it?" ).arg( _keducaFile->getCurrentURL().fileName() ), + "Do you want to save it?" ).tqarg( _keducaFile->getCurrentURL().fileName() ), i18n( "Save Document?" ), KStdGuiItem::save(), KStdGuiItem::discard() ); switch (res) { @@ -324,7 +324,7 @@ void KEducaBuilder::slotAdd() edit.init( _keducaFile, false ); if( !edit.exec() ) return; - _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::QF_TEXT ) ); + _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::TQF_TEXT ) ); _listAnswer->setCurrentItem( _listAnswer->count()-1 ); slotPreview( _listAnswer->item(_listAnswer->currentItem()) ); } @@ -340,7 +340,7 @@ void KEducaBuilder::slotEdit() edit.init( _keducaFile, true ); if( edit.exec() ) { - _listAnswer->changeItem( image0, _keducaFile->getQuestion( FileRead::QF_TEXT ), _listAnswer->currentItem() ); + _listAnswer->changeItem( image0, _keducaFile->getQuestion( FileRead::TQF_TEXT ), _listAnswer->currentItem() ); slotPreview( _listAnswer->item(_listAnswer->currentItem()) ); } } @@ -409,7 +409,7 @@ bool KEducaBuilder::fileSaveAs() TQCheckBox *saveCompressedCheckBox = new TQCheckBox( i18n( "Compress the file" ), 0 ); saveCompressedCheckBox->setChecked( true ); - KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, this, "file dialog", true, saveCompressedCheckBox); + KFileDialog *dialog=new KFileDialog(TQString(), TQString(), this, "file dialog", true, saveCompressedCheckBox); dialog->setCaption( i18n("Save Document As") ); dialog->setKeepLocation( true ); dialog->setOperationMode( KFileDialog::Saving ); @@ -485,7 +485,7 @@ void KEducaBuilder::slotFilePrint() TQString file = _keducaFile->getCurrentURL().fileName(); if (file.isEmpty()) file = i18n("Test"); - if(printer->setup(this, i18n("Print %1").arg(file))) + if(printer->setup(this, i18n("Print %1").tqarg(file))) { TQPaintDeviceMetrics metrics(printer); TQPainter p; @@ -502,7 +502,7 @@ void KEducaBuilder::slotFilePrint() while(!_keducaFile->recordEOF()) { p.drawText( 10, yPos+margin, metrics.width(), fm.lineSpacing(), - ExpandTabs | DontClip, _keducaFile->getQuestion(FileRead::QF_TEXT) ); + ExpandTabs | DontClip, _keducaFile->getQuestion(FileRead::TQF_TEXT) ); yPos += fm.lineSpacing(); p.drawLine(10, yPos+margin, metrics.width(), yPos+margin); @@ -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)"), TQString::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(), 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."), - TQString::null, i18n("Insert Question"))==KMessageBox::Continue) + TQString(), i18n("Insert Question"))==KMessageBox::Continue) slotAdd(); else return false; diff --git a/keduca/keducabuilder/keducabuilder.h b/keduca/keducabuilder/keducabuilder.h index c3a736a7..93d9cce1 100644 --- a/keduca/keducabuilder/keducabuilder.h +++ b/keduca/keducabuilder/keducabuilder.h @@ -36,9 +36,10 @@ class KEducaBuilder : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KEducaBuilder(TQWidget* parent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose); + KEducaBuilder(TQWidget* tqparent=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(); diff --git a/keduca/keducabuilder/keducaeditorstartdialog.cpp b/keduca/keducabuilder/keducaeditorstartdialog.cpp index 8528b6ba..a8fd5aaa 100644 --- a/keduca/keducabuilder/keducaeditorstartdialog.cpp +++ b/keduca/keducabuilder/keducaeditorstartdialog.cpp @@ -29,8 +29,8 @@ /** */ -KEducaEditorStartDialog::KEducaEditorStartDialog(KEducaBuilder * parent, const char* name, bool modal, WFlags fl) - :KEducaEditorStartDialogBase(parent, name, modal, fl), +KEducaEditorStartDialog::KEducaEditorStartDialog(KEducaBuilder * tqparent, const char* name, bool modal, WFlags fl) + :KEducaEditorStartDialogBase(tqparent, name, modal, fl), _choice(NewDoc), _maxRecentDocumentItems(20) { @@ -62,8 +62,8 @@ void KEducaEditorStartDialog::buildRecentFilesList() // read file list for( unsigned int i = 1 ; i <= _maxRecentDocumentItems ; i++ ) { - key = TQString( "File%1" ).arg( i ); - value = config->readEntry( key, TQString::null ); + key = TQString( "File%1" ).tqarg( i ); + value = config->readEntry( key, TQString() ); if (!value.isNull()) recentDocumentCB->insertURL( KURL(value) ); diff --git a/keduca/keducabuilder/keducaeditorstartdialog.h b/keduca/keducabuilder/keducaeditorstartdialog.h index dd163848..1823c3d7 100644 --- a/keduca/keducabuilder/keducaeditorstartdialog.h +++ b/keduca/keducabuilder/keducaeditorstartdialog.h @@ -31,11 +31,12 @@ class KEducaBuilder; */ class KEducaEditorStartDialog : public KEducaEditorStartDialogBase{ Q_OBJECT + TQ_OBJECT public: enum {Rejected=0, OpenDoc=1, OpenRecentDoc=2, Gallery=3, NewDoc=4}StartChoice; /** Constructor. */ - KEducaEditorStartDialog(KEducaBuilder * parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + KEducaEditorStartDialog(KEducaBuilder * tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); /** Destructor. */ virtual ~KEducaEditorStartDialog(); diff --git a/keduca/keducabuilder/keducaeditorstartdialogbase.ui b/keduca/keducabuilder/keducaeditorstartdialogbase.ui index 0cb69e39..65ad01f3 100644 --- a/keduca/keducabuilder/keducaeditorstartdialogbase.ui +++ b/keduca/keducabuilder/keducaeditorstartdialogbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KEducaEditorStartDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KEducaEditorStartDialogBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>startChoiceBtnGrp</cstring> </property> @@ -51,7 +51,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout13</cstring> </property> @@ -65,7 +65,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>openDocumentRB</cstring> </property> @@ -76,7 +76,7 @@ <string>Open an &existing document:</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -100,7 +100,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -116,7 +116,7 @@ </widget> </vbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>openRecentDocumentRB</cstring> </property> @@ -130,7 +130,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout15</cstring> </property> @@ -154,7 +154,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -168,7 +168,7 @@ </widget> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton4</cstring> </property> @@ -176,7 +176,7 @@ <string>Open with Internet gallery browser</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>newDocumentRB</cstring> </property> @@ -203,7 +203,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -217,7 +217,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -238,14 +238,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -259,7 +259,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -312,7 +312,7 @@ <tabstop>openDocumentRB</tabstop> <tabstop>openRecentDocumentRB</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/keduca/keducabuilder/klangcombo.cpp b/keduca/keducabuilder/klangcombo.cpp index 1d86c09e..0371b7af 100644 --- a/keduca/keducabuilder/klangcombo.cpp +++ b/keduca/keducabuilder/klangcombo.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker <bieker@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -31,21 +31,21 @@ KLanguageCombo::~KLanguageCombo () { } -KLanguageCombo::KLanguageCombo (TQWidget * parent, const char *name) - : KTagComboBox(parent, name) +KLanguageCombo::KLanguageCombo (TQWidget * tqparent, const char *name) + : KTagComboBox(tqparent, name) { } void KLanguageCombo::insertLanguage(const TQString& path, const TQString& name, const TQString& sub, const TQString &submenu) { - TQString output = name + TQString::fromLatin1(" (") + path + TQString::fromLatin1(")"); - TQPixmap flag(locate("locale", sub + path + TQString::fromLatin1("/flag.png"))); + TQString output = name + TQString::tqfromLatin1(" (") + path + TQString::tqfromLatin1(")"); + TQPixmap flag(locate("locale", sub + path + TQString::tqfromLatin1("/flag.png"))); insertItem(TQIconSet(flag), output, path, submenu); } void KLanguageCombo::changeLanguage(const TQString& name, int i) { if (i < 0 || i >= count()) return; - TQString output = name + TQString::fromLatin1(" (") + tag(i) + TQString::fromLatin1(")"); + TQString output = name + TQString::tqfromLatin1(" (") + tag(i) + TQString::tqfromLatin1(")"); changeItem(output, i); } diff --git a/keduca/keducabuilder/klangcombo.h b/keduca/keducabuilder/klangcombo.h index 2aca5753..0dc13d01 100644 --- a/keduca/keducabuilder/klangcombo.h +++ b/keduca/keducabuilder/klangcombo.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker <bieker@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -35,12 +35,13 @@ class KLanguageCombo : public KTagComboBox { Q_OBJECT + TQ_OBJECT public: - KLanguageCombo(TQWidget *parent=0, const char *name=0); + KLanguageCombo(TQWidget *tqparent=0, const char *name=0); ~KLanguageCombo(); - void insertLanguage(const TQString& path, const TQString& name, const TQString& sub = TQString::null, const TQString &submenu = TQString::null); + void insertLanguage(const TQString& path, const TQString& name, const TQString& sub = TQString(), const TQString &submenu = TQString()); void changeLanguage(const TQString& name, int i); }; diff --git a/keduca/keducabuilder/ktagcombobox.cpp b/keduca/keducabuilder/ktagcombobox.cpp index 5a84574c..f89f14df 100644 --- a/keduca/keducabuilder/ktagcombobox.cpp +++ b/keduca/keducabuilder/ktagcombobox.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker <bieker@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -36,8 +36,8 @@ KTagComboBox::~KTagComboBox () delete _tags; } -KTagComboBox::KTagComboBox (TQWidget * parent, const char *name) - : TQComboBox(parent, name) +KTagComboBox::KTagComboBox (TQWidget * tqparent, const char *name) + : TQComboBox(tqparent, name) { _popup = new TQPopupMenu(this); _tags = new TQStringList; @@ -84,7 +84,7 @@ void KTagComboBox::internalActivate( int index ) if (_current == index) return; _current = index; emit activated( index ); - repaint(); + tqrepaint(); } void KTagComboBox::internalHighlight( int index ) @@ -105,12 +105,12 @@ int KTagComboBox::count() const static inline TQPopupMenu *checkInsertIndex(TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu, int *index) { - int pos = tags->findIndex(submenu); + int pos = tags->tqfindIndex(submenu); TQPopupMenu *pi = 0; if (pos != -1) { - TQMenuItem *p = popup->findItem(popup->idAt(pos)); + TQMenuItem *p = popup->tqfindItem(popup->idAt(pos)); pi = p?p->popup():0; } if (!pi) pi = popup; @@ -139,7 +139,7 @@ void KTagComboBox::insertSeparator(const TQString &submenu, int index) { TQPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index); pi->insertSeparator(index); - _tags->append(TQString::null); + _tags->append(TQString()); } void KTagComboBox::insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu, int index) @@ -158,7 +158,7 @@ void KTagComboBox::changeItem( const TQString &text, int index ) { _popup->changeItem( text, index); if (index == _current) - repaint(); + tqrepaint(); } void KTagComboBox::paintEvent( TQPaintEvent * ev) @@ -170,7 +170,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev) // Text TQRect clip(2, 2, width() - 4, height() - 4); if ( hasFocus()) - p.setPen( colorGroup().highlightedText() ); + p.setPen( tqcolorGroup().highlightedText() ); p.drawText(clip, AlignCenter | SingleLine, _popup->text( _current )); // Icon @@ -183,7 +183,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev) bool KTagComboBox::containsTag( const TQString &str ) const { - return _tags->contains(str) > 0; + return _tags->tqcontains(str) > 0; } TQString KTagComboBox::currentTag() const @@ -196,7 +196,7 @@ TQString KTagComboBox::tag(int i) const if (i < 0 || i >= count()) { kdDebug() << "KTagComboBox::tag(), unknown tag " << i << endl; - return TQString::null; + return TQString(); } return *_tags->at(i); } @@ -210,12 +210,12 @@ void KTagComboBox::setCurrentItem(int i) { if (i < 0 || i >= count()) return; _current = i; - repaint(); + tqrepaint(); } void KTagComboBox::setCurrentItem(const TQString &code) { - int i = _tags->findIndex(code); + int i = _tags->tqfindIndex(code); if (code.isNull()) i = 0; if (i != -1) diff --git a/keduca/keducabuilder/ktagcombobox.h b/keduca/keducabuilder/ktagcombobox.h index ffeb2cda..ef0042ec 100644 --- a/keduca/keducabuilder/ktagcombobox.h +++ b/keduca/keducabuilder/ktagcombobox.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker <bieker@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -36,18 +36,19 @@ class TQStringList; * * It has also support for sub menues. */ -class KTagComboBox : public QComboBox +class KTagComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: - KTagComboBox(TQWidget *parent=0, const char *name=0); + KTagComboBox(TQWidget *tqparent=0, const char *name=0); ~KTagComboBox(); - 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 insertItem(const TQIconSet& icon, const TQString &text, const TQString &tag, const TQString &submenu = TQString(), int index=-1 ); + void insertItem(const TQString &text, const TQString &tag, const TQString &submenu = TQString(), int index=-1 ); + void insertSeparator(const TQString &submenu = TQString(), int index=-1 ); + void insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu = TQString(), int index=-1); void changeItem( const TQString &text, int index ); int count() const; |