summaryrefslogtreecommitdiffstats
path: root/keduca/keduca
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /keduca/keduca
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'keduca/keduca')
-rw-r--r--keduca/keduca/Makefile.am4
-rw-r--r--keduca/keduca/configdialogbase.ui20
-rw-r--r--keduca/keduca/kcheckeduca.cpp12
-rw-r--r--keduca/keduca/kcheckeduca.h3
-rw-r--r--keduca/keduca/keduca.cpp20
-rw-r--r--keduca/keduca/keduca.h3
-rw-r--r--keduca/keduca/keduca_part.cpp8
-rw-r--r--keduca/keduca/keduca_part.h3
-rw-r--r--keduca/keduca/keducaprefs.cpp18
-rw-r--r--keduca/keduca/keducaprefs.h3
-rw-r--r--keduca/keduca/keducaview.cpp60
-rw-r--r--keduca/keduca/keducaview.h7
-rw-r--r--keduca/keduca/kgroupeduca.cpp10
-rw-r--r--keduca/keduca/kgroupeduca.h3
-rw-r--r--keduca/keduca/kquestion.cpp12
-rw-r--r--keduca/keduca/kquestion.h5
-rw-r--r--keduca/keduca/kradioeduca.cpp12
-rw-r--r--keduca/keduca/kradioeduca.h3
18 files changed, 107 insertions, 99 deletions
diff --git a/keduca/keduca/Makefile.am b/keduca/keduca/Makefile.am
index fb713daf..a1199e17 100644
--- a/keduca/keduca/Makefile.am
+++ b/keduca/keduca/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES= -I../libkeduca $(all_includes)
# The binary program keduca
bin_PROGRAMS = keduca
keduca_LDFLAGS = $(all_libraries)
-keduca_LDADD = $(LIB_KFILE) $(LIB_KPARTS) ../libkeduca/libkeduca.la
+keduca_LDADD = $(LIB_KFILE) $(LIB_KPARTS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) ../libkeduca/libkeduca.la
keduca_SOURCES = main.cpp keduca.cpp
# Convenience library
@@ -17,7 +17,7 @@ keduca_SOURCES = main.cpp keduca.cpp
# The KParts Component
kde_module_LTLIBRARIES = libkeducapart.la
-libkeducapart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries)
+libkeducapart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO)
libkeducapart_la_LIBADD = ../libkeduca/libkeduca.la $(LIB_KPARTS)
libkeducapart_la_SOURCES = keduca_part.cpp kradioeduca.cpp kquestion.cpp \
kgroupeduca.cpp keducaview.cpp keducaprefs.cpp \
diff --git a/keduca/keduca/configdialogbase.ui b/keduca/keduca/configdialogbase.ui
index bb526841..18446407 100644
--- a/keduca/keduca/configdialogbase.ui
+++ b/keduca/keduca/configdialogbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialogBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigDialogBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>kcfg_ResultFinish</cstring>
</property>
@@ -30,7 +30,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>testEnd</cstring>
</property>
@@ -38,7 +38,7 @@
<string>At the end of the test</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>afterEachQuestion</cstring>
</property>
@@ -48,7 +48,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>orderingButtonGroup</cstring>
</property>
@@ -59,7 +59,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RandomQuestions</cstring>
</property>
@@ -67,7 +67,7 @@
<string>Show questions in random order</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RandomAnswers</cstring>
</property>
@@ -87,7 +87,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>51</height>
@@ -96,5 +96,5 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/keduca/keduca/kcheckeduca.cpp b/keduca/keduca/kcheckeduca.cpp
index a75c8478..996bbe04 100644
--- a/keduca/keduca/kcheckeduca.cpp
+++ b/keduca/keduca/kcheckeduca.cpp
@@ -21,7 +21,7 @@
#include <tqstyle.h>
#include <kaccelmanager.h>
-KCheckEduca::KCheckEduca(TQWidget *parent, const char *name ) : TQCheckBox(parent,name)
+KCheckEduca::KCheckEduca(TQWidget *tqparent, const char *name ) : TQCheckBox(tqparent,name)
{
_doc = 0;
KAcceleratorManager::setNoAccel( this );
@@ -38,7 +38,7 @@ void KCheckEduca::drawButtonLabel( TQPainter *p){
int extra_width, indicator_width;
extra_width = 8;
- indicator_width = style().pixelMetric(TQStyle::PM_IndicatorWidth, 0);
+ indicator_width = tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth, 0);
y = 0;
x = indicator_width + extra_width; //###
@@ -61,14 +61,14 @@ void KCheckEduca::drawButtonLabel( TQPainter *p){
yo = (cr.height()-rh)/2;
if ( !isEnabled() ) {
- TQColorGroup cg = colorGroup();
+ TQColorGroup cg = tqcolorGroup();
cg.setColor( TQColorGroup::Text, cg.light() );
_doc->draw(p, cr.x()+xo+1, cr.y()+yo+1, cr, cg, 0);
}
- _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, colorGroup(), 0);
+ _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, tqcolorGroup(), 0);
if ( hasFocus() ) {
-// TQRect br = style().itemRect( p, x, y, rw, rh+yo,
+// TQRect br = tqstyle().tqitemRect( p, x, y, rw, rh+yo,
// AlignLeft|AlignVCenter|ShowPrefix,
// isEnabled(),
// pixmap(), text().visual() );
@@ -80,6 +80,6 @@ void KCheckEduca::drawButtonLabel( TQPainter *p){
br.setBottom( br.bottom()+2);
br = br.intersect( TQRect(0,0,rw, rh+yo ) );
- style().drawPrimitive( TQStyle::PE_FocusRect, p, br, colorGroup());
+ tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, p, br, tqcolorGroup());
}
}
diff --git a/keduca/keduca/kcheckeduca.h b/keduca/keduca/kcheckeduca.h
index 32ff3b81..ba854242 100644
--- a/keduca/keduca/kcheckeduca.h
+++ b/keduca/keduca/kcheckeduca.h
@@ -28,9 +28,10 @@
class KCheckEduca : public TQCheckBox {
Q_OBJECT
+ TQ_OBJECT
public:
- KCheckEduca(TQWidget *parent=0, const char *name=0);
+ KCheckEduca(TQWidget *tqparent=0, const char *name=0);
~KCheckEduca();
protected:
diff --git a/keduca/keduca/keduca.cpp b/keduca/keduca/keduca.cpp
index 2ab99ea0..a09c1b3a 100644
--- a/keduca/keduca/keduca.cpp
+++ b/keduca/keduca/keduca.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
keduca.cpp - description
-------------------
- begin : mié may 23 20:36:15 CEST 2001
+ begin : mi� may 23 20:36:15 CEST 2001
copyright : (C) 2001 by Javier Campos
email : javi@asyris.org
***************************************************************************/
@@ -30,13 +30,13 @@
#include <tqlabel.h>
-Keduca::Keduca( TQWidget* parent, const char *name, WFlags f )
- : KParts::MainWindow( parent, name, f ), _part( 0 )
+Keduca::Keduca( TQWidget* tqparent, const char *name, WFlags f )
+ : KParts::MainWindow( tqparent, name, f ), _part( 0 )
{
setXMLFile( "keducaui.rc" );
_part = KParts::ComponentFactory::createPartInstanceFromLibrary< KParts::ReadOnlyPart >
- ( "libkeducapart", this, name, this, "KEducaPart" );
+ ( "libkeducapart", this, name, TQT_TQOBJECT(this), "KEducaPart" );
if ( _part )
{
@@ -53,7 +53,7 @@ Keduca::Keduca( TQWidget* parent, const char *name, WFlags f )
kdFatal() << "The library \"libkeducapart\" could not be found. Aborting." << endl;
}
if (!initialGeometrySet())
- resize( TQSize(550, 450).expandedTo(minimumSizeHint()));
+ resize( TQSize(550, 450).expandedTo(tqminimumSizeHint()));
}
Keduca::~Keduca()
@@ -63,17 +63,17 @@ Keduca::~Keduca()
void Keduca::setupActions()
{
- KStdAction::open( this, TQT_SLOT( slotFileOpen() ), actionCollection() );
- (void)new KAction( i18n( "Open &Gallery..." ), 0, 0, this, TQT_SLOT( slotGallery() ),
+ 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(this, TQT_SLOT ( slotFileOpenURL(const KURL &) ),
+ _recentFiles = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT ( slotFileOpenURL(const KURL &) ),
actionCollection());
- KStdAction::quit(kapp, TQT_SLOT( quit() ), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT( quit() ), actionCollection());
}
void Keduca::slotFileOpen()
{
- KURL url = KFileDialog::getOpenURL( TQString::null, "application/x-edu", this, i18n("Open Educa File") );
+ KURL url = KFileDialog::getOpenURL( TQString(), "application/x-edu", this, i18n("Open Educa File") );
if( !url.isEmpty() )
slotFileOpenURL( url );
}
diff --git a/keduca/keduca/keduca.h b/keduca/keduca/keduca.h
index a997d36e..ad2d8f58 100644
--- a/keduca/keduca/keduca.h
+++ b/keduca/keduca/keduca.h
@@ -34,10 +34,11 @@
class Keduca : public KParts::MainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
/** construtor */
- Keduca(TQWidget* parent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose);
+ Keduca(TQWidget* tqparent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose);
/** destructor */
~Keduca();
/** Open gallery window */
diff --git a/keduca/keduca/keduca_part.cpp b/keduca/keduca/keduca_part.cpp
index bc9e5485..6b0e17aa 100644
--- a/keduca/keduca/keduca_part.cpp
+++ b/keduca/keduca/keduca_part.cpp
@@ -34,14 +34,14 @@
typedef KParts::GenericFactory<KEducaPart> KEducaPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkeducapart, KEducaPartFactory )
-KEducaPart::KEducaPart( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+KEducaPart::KEducaPart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const TQStringList &/*args*/ )
- : KParts::ReadOnlyPart( parent, name )
+ : KParts::ReadOnlyPart( tqparent, name )
{
setInstance( KEducaPartFactory::instance() );
- m_view = new KEducaView( parentWidget, widgetName );
+ m_view = new KEducaView( tqparentWidget, widgetName );
m_view->show();
setWidget( m_view );
diff --git a/keduca/keduca/keduca_part.h b/keduca/keduca/keduca_part.h
index 418209a8..d19d597c 100644
--- a/keduca/keduca/keduca_part.h
+++ b/keduca/keduca/keduca_part.h
@@ -36,11 +36,12 @@ class KAboutData;
class KEducaPart : public KParts::ReadOnlyPart
{
Q_OBJECT
+ TQ_OBJECT
public:
/*
* Constructor.
*/
- KEducaPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ KEducaPart( TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList &args );
/*
diff --git a/keduca/keduca/keducaprefs.cpp b/keduca/keduca/keducaprefs.cpp
index bdd07677..1546e9ce 100644
--- a/keduca/keduca/keducaprefs.cpp
+++ b/keduca/keduca/keducaprefs.cpp
@@ -27,7 +27,7 @@
#include <tqbuttongroup.h>
-KEducaPrefs::KEducaPrefs(TQWidget *parent, const char *name, bool modal ) : KDialogBase(IconList, i18n("Configure"), Ok|Cancel, Ok, parent, name, modal, true)
+KEducaPrefs::KEducaPrefs(TQWidget *tqparent, const char *name, bool modal ) : KDialogBase(IconList, i18n("Configure"), Ok|Cancel, Ok, tqparent, name, modal, true)
{
setPageGeneral();
configRead();
@@ -45,10 +45,10 @@ void KEducaPrefs::setPageGeneral()
TQButtonGroup *buttonGroup1 = new TQButtonGroup( mainFrame, "ButtonGroup1" );
buttonGroup1->setTitle( i18n( "General" ) );
buttonGroup1->setColumnLayout(0, Qt::Vertical );
- buttonGroup1->layout()->setSpacing( 0 );
- buttonGroup1->layout()->setMargin( 0 );
- TQVBoxLayout *buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() );
- buttonGroup1Layout->setAlignment( Qt::AlignTop );
+ buttonGroup1->tqlayout()->setSpacing( 0 );
+ buttonGroup1->tqlayout()->setMargin( 0 );
+ TQVBoxLayout *buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->tqlayout() );
+ buttonGroup1Layout->tqsetAlignment( TQt::AlignTop );
buttonGroup1Layout->setSpacing( 6 );
buttonGroup1Layout->setMargin( 11 );
@@ -63,10 +63,10 @@ void KEducaPrefs::setPageGeneral()
TQGroupBox *GroupBox1 = new TQGroupBox( mainFrame, "GroupBox7" );
GroupBox1->setTitle( i18n( "Order" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
- GroupBox1->layout()->setSpacing( 0 );
- GroupBox1->layout()->setMargin( 0 );
- TQVBoxLayout *GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() );
- GroupBox1Layout->setAlignment( Qt::AlignTop );
+ GroupBox1->tqlayout()->setSpacing( 0 );
+ GroupBox1->tqlayout()->setMargin( 0 );
+ TQVBoxLayout *GroupBox1Layout = new TQVBoxLayout( GroupBox1->tqlayout() );
+ GroupBox1Layout->tqsetAlignment( TQt::AlignTop );
GroupBox1Layout->setSpacing( 6 );
GroupBox1Layout->setMargin( 11 );
diff --git a/keduca/keduca/keducaprefs.h b/keduca/keduca/keducaprefs.h
index 39efb2e2..5693489d 100644
--- a/keduca/keduca/keducaprefs.h
+++ b/keduca/keduca/keducaprefs.h
@@ -29,9 +29,10 @@
class KEducaPrefs : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KEducaPrefs(TQWidget *parent=0, const char *name=0, bool modal=true);
+ KEducaPrefs(TQWidget *tqparent=0, const char *name=0, bool modal=true);
~KEducaPrefs();
private:
diff --git a/keduca/keduca/keducaview.cpp b/keduca/keduca/keducaview.cpp
index 5c07c9c3..6207760f 100644
--- a/keduca/keduca/keducaview.cpp
+++ b/keduca/keduca/keducaview.cpp
@@ -37,8 +37,8 @@
#include <tqlabel.h>
#include <tqtextedit.h>
-KEducaView::KEducaView( TQWidget *parent, const char *name )
- : TQWidgetStack( parent, name ), _keducaFile( 0 ), _timeoutTimer( 0 )
+KEducaView::KEducaView( TQWidget *tqparent, const char *name )
+ : TQWidgetStack( tqparent, name ), _keducaFile( 0 ), _timeoutTimer( 0 )
{
init();
}
@@ -59,8 +59,8 @@ void KEducaView::init()
{
// Intro Screen
_introWidget = new TQLabel( this, "introScreen" );
- _introWidget->setBackgroundColor( Qt::white );
- _introWidget->setAlignment( AlignCenter );
+ _introWidget->setBackgroundColor( TQt::white );
+ _introWidget->tqsetAlignment( AlignCenter );
_introWidget->setPixmap( TQPixmap( locate("data","keduca/pics/keduca_init.png") ) );
addWidget( _introWidget, 0 );
@@ -74,7 +74,7 @@ void KEducaView::init()
// Question Widget
_questionWidget = new TQVBox( this, "questionWidget" );
- _split = new TQSplitter( TQSplitter::Vertical, _questionWidget );
+ _split = new TQSplitter( Qt::Vertical, _questionWidget );
_questionText = new KQuestion( _split, "kquestion" );
_buttonGroup = new KGroupEduca( _split, "ButtonGroup" );
_buttonGroup->setRadioButtonExclusive( true );
@@ -121,7 +121,7 @@ void KEducaView::slotButtonNext()
_questionText->countdown(0);
}
- if( ( visibleWidget() == _questionWidget ) && !_isInitStatus )
+ if( ( visibleWidget() == _questionWidget ) && !_isInittqStatus )
setResults();
_buttonGroup->clearAnswers();
@@ -147,7 +147,7 @@ void KEducaView::slotButtonNext()
/** Button Save action */
void KEducaView::slotButtonSave()
{
- KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, this, "file dialog", true);
+ KFileDialog *dialog=new KFileDialog(TQString(), TQString(), this, "file dialog", true);
dialog->setCaption( i18n("Save Results As") );
dialog->setKeepLocation( true );
dialog->setOperationMode( KFileDialog::Saving );
@@ -209,16 +209,16 @@ void KEducaView::showRecord()
// SHOW QUESTION *******************************************************************
_questionText->setPixmap( _keducaFile->getPicturePixmap() );
questionTextTemp = "<table width=100%><tr><td><b>"
- + i18n("Question %1").arg(_keducaFileIndex) + "</b>";
+ + i18n("Question %1").tqarg(_keducaFileIndex) + "</b>";
if( _keducaFile->getTotalPoints() > 0 )
questionTextTemp += "</td><td align=center bgColor=#336699><font color=#ffffff><b>"
- + _keducaFile->getQuestion( FileRead::QF_POINTS )
+ + _keducaFile->getQuestion( FileRead::TQF_POINTS )
+ " " + i18n("Points")
+ "</b></font>";
questionTextTemp += "</tr></td></table><hr/><table><tr><td>"
- + _keducaFile->getQuestion( FileRead::QF_TEXT )
+ + _keducaFile->getQuestion( FileRead::TQF_TEXT )
+ "</td></tr></table>";
_questionText->setText( questionTextTemp );
@@ -261,15 +261,15 @@ void KEducaView::showRecord()
// START THE TIMER *****************************************************************
- if( _keducaFile->getQuestionInt(FileRead::QF_TIME) > 0 )
+ if( _keducaFile->getQuestionInt(FileRead::TQF_TIME) > 0 )
{
KMessageBox::information( this,
i18n( "You have %1 seconds to complete this question.\n\n"
"Press OK when you are ready." )
- .arg( _keducaFile->getQuestion(FileRead::QF_TIME) ) );
+ .tqarg( _keducaFile->getQuestion(FileRead::TQF_TIME) ) );
}
- int timeout = _keducaFile->getQuestionInt(FileRead::QF_TIME);
+ int timeout = _keducaFile->getQuestionInt(FileRead::TQF_TIME);
if (timeout > 0)
{
if (!_timeoutTimer)
@@ -290,7 +290,7 @@ void KEducaView::showRecord()
void KEducaView::questionTimedOut()
{
- _currentTime += _keducaFile->getQuestionInt(FileRead::QF_TIME);
+ _currentTime += _keducaFile->getQuestionInt(FileRead::TQF_TIME);
slotButtonNext();
}
@@ -353,13 +353,13 @@ void KEducaView::setResults()
{
_correctAnswer++;
if( _keducaFile->getTotalPoints() > 0 )
- _correctPoints += _keducaFile->getQuestionInt(FileRead::QF_POINTS);
+ _correctPoints += _keducaFile->getQuestionInt(FileRead::TQF_POINTS);
}
else
{
_incorrectAnswer++;
if( _keducaFile->getTotalPoints() > 0 )
- _incorrectPoints += _keducaFile->getQuestionInt(FileRead::QF_POINTS);
+ _incorrectPoints += _keducaFile->getQuestionInt(FileRead::TQF_POINTS);
}
_results += getTableQuestion( isCorrect, correctAnswer, yourAnswer );
@@ -404,7 +404,7 @@ bool KEducaView::openURL( const KURL &url)
if ( !_keducaFile->openFile( url ) )
return false;
- _isInitStatus = true;
+ _isInittqStatus = true;
_results = "<HTML>";
_correctAnswer = 0;
_correctPoints = 0;
@@ -436,12 +436,12 @@ void KEducaView::configWrite()
Settings::writeConfig();
}
-/** current Status Points */
+/** current tqStatus Points */
TQString KEducaView::currentStatusPoints()
{
- TQString tempStatus;
+ TQString temptqStatus;
- tempStatus = insertTable()
+ temptqStatus = insertTable()
+ insertRow( i18n("Statistics"), true, 4)
+ insertRow( i18n("Correct questions"),
TQString().setNum( _correctAnswer ),
@@ -449,20 +449,20 @@ TQString KEducaView::currentStatusPoints()
TQString().setNum( _incorrectAnswer ), true);
if( _keducaFile->getTotalPoints() > 0 )
- tempStatus += insertRow( i18n("Total points"), true, 4 )
+ temptqStatus += insertRow( i18n("Total points"), true, 4 )
+ insertRow( i18n("Correct points"),
TQString().setNum( _correctPoints ),
i18n("Incorrect points"),
TQString().setNum( _incorrectPoints ), true );
if( _keducaFile->getTotalTime() > 0 )
- tempStatus += insertRow( i18n("Time"), true, 4 )
+ temptqStatus += insertRow( i18n("Time"), true, 4 )
+ insertRow( i18n("Total time"),
TQString().setNum( _keducaFile->getTotalTime() ),
i18n("Time in tests"),
TQString().setNum( _currentTime ), true );
- tempStatus += insertTableClose();
- return tempStatus;
+ temptqStatus += insertTableClose();
+ return temptqStatus;
}
/** Set HTML table view with correct and incorrect answers */
@@ -476,10 +476,10 @@ TQString KEducaView::getTableQuestion( bool isCorrect, const TQString &correct,
_currentResults += "></TD><TD VALIGN=TOP>";
- _currentResults += "<B><FONT COLOR=#336699>" + _keducaFile->getQuestion( FileRead::QF_TEXT ) + "</FONT></B>";
+ _currentResults += "<B><FONT COLOR=#336699>" + _keducaFile->getQuestion( FileRead::TQF_TEXT ) + "</FONT></B>";
- if( _keducaFile->getQuestionInt(FileRead::QF_POINTS) > 0 )
- _currentResults += "<SMALL> ( " + _keducaFile->getQuestion(FileRead::QF_POINTS) + " " + i18n("Points") + " )</SMALL>";
+ if( _keducaFile->getQuestionInt(FileRead::TQF_POINTS) > 0 )
+ _currentResults += "<SMALL> ( " + _keducaFile->getQuestion(FileRead::TQF_POINTS) + " " + i18n("Points") + " )</SMALL>";
_currentResults += "<HR><SMALL>";
@@ -503,15 +503,15 @@ TQString KEducaView::getTableQuestion( bool isCorrect, const TQString &correct,
/** Define the next questions (random, secuencial) */
bool KEducaView::questionNext()
{
- if( !Settings::randomQuestions() && !_isInitStatus )
+ if( !Settings::randomQuestions() && !_isInittqStatus )
{
_keducaFile->recordNext();
return _keducaFile->recordEOF() ? false : true;
}
- if( _isInitStatus )
+ if( _isInittqStatus )
{
- _isInitStatus = false;
+ _isInittqStatus = false;
if( !Settings::randomQuestions() ) return true;
}
diff --git a/keduca/keduca/keducaview.h b/keduca/keduca/keducaview.h
index aa04df5e..0e70edd3 100644
--- a/keduca/keduca/keducaview.h
+++ b/keduca/keduca/keducaview.h
@@ -40,12 +40,13 @@ class KGroupEduca;
*@author Javier Campos
*/
-class KEducaView : public QWidgetStack
+class KEducaView : public TQWidgetStack
{
Q_OBJECT
+ TQ_OBJECT
public:
- KEducaView(TQWidget *parent=0, const char *name=0);
+ KEducaView(TQWidget *tqparent=0, const char *name=0);
~KEducaView();
/** Open url */
bool openURL( const KURL &url);
@@ -114,7 +115,7 @@ private:
/** Current results */
TQString _currentResults;
/** If is init window */
- bool _isInitStatus;
+ bool _isInittqStatus;
TQTimer *_timeoutTimer;
/** Num of correct answers */
int _correctAnswer;
diff --git a/keduca/keduca/kgroupeduca.cpp b/keduca/keduca/kgroupeduca.cpp
index 9f7a2413..958134e2 100644
--- a/keduca/keduca/kgroupeduca.cpp
+++ b/keduca/keduca/kgroupeduca.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
-KGroupEduca::KGroupEduca(TQWidget *parent, const char *name ) : TQVButtonGroup(i18n("Answers"), parent, name)
+KGroupEduca::KGroupEduca(TQWidget *tqparent, const char *name ) : TQVButtonGroup(i18n("Answers"), tqparent, name)
{
_sv = new TQScrollView(this);
_sv->setVScrollBarMode(TQScrollView::Auto);
@@ -54,7 +54,7 @@ void KGroupEduca::insertAnswer( const TQString& text)
answer = new KCheckEduca( _vbox2 );
break;
}
- answer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0 ) );
+ answer->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0 ) );
answer->setText( text );
answer->show();
insert(answer);
@@ -73,7 +73,7 @@ void KGroupEduca::clearAnswers()
for( unsigned int i=0 ; i<maxButton ; ++i )
{
TQButton *tmpButton;
- if( (tmpButton = find(i)) )
+ if( (tmpButton = tqfind(i)) )
remove(tmpButton);
delete tmpButton;
}
@@ -87,13 +87,13 @@ bool KGroupEduca::isChecked(int id)
{
case Radio:
{
- KRadioEduca *tmpRadioButton = (KRadioEduca*) find(id);
+ KRadioEduca *tmpRadioButton = (KRadioEduca*) tqfind(id);
if(tmpRadioButton != 0) return tmpRadioButton->isChecked();
}
break;
case Check:
{
- KCheckEduca *tmpCheckButton = (KCheckEduca*) find(id);
+ KCheckEduca *tmpCheckButton = (KCheckEduca*) tqfind(id);
if(tmpCheckButton != 0) return tmpCheckButton->isChecked();
}
break;
diff --git a/keduca/keduca/kgroupeduca.h b/keduca/keduca/kgroupeduca.h
index 532bb890..c7e574ca 100644
--- a/keduca/keduca/kgroupeduca.h
+++ b/keduca/keduca/kgroupeduca.h
@@ -27,11 +27,12 @@
*/
class KGroupEduca : public TQVButtonGroup {
Q_OBJECT
+ TQ_OBJECT
public:
enum ButtonType { Radio, Check };
- KGroupEduca(TQWidget *parent=0, const char *name=0);
+ KGroupEduca(TQWidget *tqparent=0, const char *name=0);
~KGroupEduca();
/** Insert a check or radio button */
void insertAnswer( const TQString& text);
diff --git a/keduca/keduca/kquestion.cpp b/keduca/keduca/kquestion.cpp
index 69a90fdd..d3473275 100644
--- a/keduca/keduca/kquestion.cpp
+++ b/keduca/keduca/kquestion.cpp
@@ -27,8 +27,8 @@
#include <kprogress.h>
#include <klocale.h>
-KQuestion::KQuestion( TQWidget *parent, const char *name )
- : TQHBox( parent, name ), _countdownTimer( 0 )
+KQuestion::KQuestion( TQWidget *tqparent, const char *name )
+ : TQHBox( tqparent, name ), _countdownTimer( 0 )
{
initGUI();
}
@@ -42,16 +42,16 @@ void KQuestion::initGUI()
{
setFrameShape( TQFrame::Box );
setFrameShadow( TQFrame::Plain );
- setPalette( TQPalette( Qt::white ) );
+ setPalette( TQPalette( TQt::white ) );
TQVBox *picBox = new TQVBox( this );
_picture = new TQLabel( picBox, "PixmapLabel1" );
_picture->setScaledContents( FALSE );
- _picture->setPalette( TQPalette( Qt::white ) );
+ _picture->setPalette( TQPalette( TQt::white ) );
_countdownWidget = new KProgress( picBox );
- _countdownWidget->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred,
+ _countdownWidget->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred,
TQSizePolicy::Preferred ) );
_countdownWidget->setFormat( i18n( "%v seconds left" ) );
@@ -60,7 +60,7 @@ void KQuestion::initGUI()
_view->setFrameShape( TQTextEdit::NoFrame );
_view->setHScrollBarMode( TQTextEdit::AlwaysOff );
_view->setTextFormat( TQTextEdit::RichText );
- _view->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, true ) );
+ _view->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, true ) );
}
/** Set text */
diff --git a/keduca/keduca/kquestion.h b/keduca/keduca/kquestion.h
index 0f349580..b3368e5c 100644
--- a/keduca/keduca/kquestion.h
+++ b/keduca/keduca/kquestion.h
@@ -30,12 +30,13 @@ class KProgress;
* The Widget that is used to display the Question.
*@author Javier Campos Morales
*/
-class KQuestion : public QHBox
+class KQuestion : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KQuestion(TQWidget *parent=0, const char *name=0);
+ KQuestion(TQWidget *tqparent=0, const char *name=0);
~KQuestion();
/** Set pixmap */
void setPixmap( const TQPixmap pixmap);
diff --git a/keduca/keduca/kradioeduca.cpp b/keduca/keduca/kradioeduca.cpp
index 89b3e830..80c9cf89 100644
--- a/keduca/keduca/kradioeduca.cpp
+++ b/keduca/keduca/kradioeduca.cpp
@@ -20,7 +20,7 @@
#include <tqstyle.h>
#include <kaccelmanager.h>
-KRadioEduca::KRadioEduca(TQWidget *parent, const char *name) : TQRadioButton(parent,name)
+KRadioEduca::KRadioEduca(TQWidget *tqparent, const char *name) : TQRadioButton(tqparent,name)
{
_doc=0;
KAcceleratorManager::setNoAccel(this);
@@ -37,7 +37,7 @@ void KRadioEduca::drawButtonLabel( TQPainter *p)
int x, y, w, h;
int extra_width, indicator_width;
extra_width = 8;
- indicator_width = style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0);
+ indicator_width = tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0);
y = 0;
x = indicator_width + extra_width; //###
@@ -60,14 +60,14 @@ void KRadioEduca::drawButtonLabel( TQPainter *p)
yo = (cr.height()-rh)/2;
if (!isEnabled() ) {
- TQColorGroup cg = colorGroup();
+ TQColorGroup cg = tqcolorGroup();
cg.setColor( TQColorGroup::Text, cg.light() );
_doc->draw(p, cr.x()+xo+1, cr.y()+yo+1, cr, cg, 0);
}
- _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, colorGroup(), 0);
+ _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, tqcolorGroup(), 0);
if ( hasFocus() ) {
-// TQRect br = style().itemRect( p, x, y, rw, rh+yo,
+// TQRect br = tqstyle().tqitemRect( p, x, y, rw, rh+yo,
// AlignLeft|AlignVCenter|ShowPrefix,
// isEnabled(),
// pixmap(), text().visual() );
@@ -78,6 +78,6 @@ void KRadioEduca::drawButtonLabel( TQPainter *p)
br.setTop( br.top()-2 );
br.setBottom( br.bottom()+2);
br = br.intersect( TQRect(0,0,rw, rh+yo ) );
- style().drawPrimitive( TQStyle::PE_FocusRect, p, br, colorGroup());
+ tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, p, br, tqcolorGroup());
}
}
diff --git a/keduca/keduca/kradioeduca.h b/keduca/keduca/kradioeduca.h
index f23c74a1..cf1a0b56 100644
--- a/keduca/keduca/kradioeduca.h
+++ b/keduca/keduca/kradioeduca.h
@@ -27,9 +27,10 @@
*/
class KRadioEduca : public TQRadioButton {
Q_OBJECT
+ TQ_OBJECT
public:
- KRadioEduca(TQWidget *parent=0, const char *name=0);
+ KRadioEduca(TQWidget *tqparent=0, const char *name=0);
~KRadioEduca();
protected: