summaryrefslogtreecommitdiffstats
path: root/kalarm/lib
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kalarm/lib
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/lib')
-rw-r--r--kalarm/lib/buttongroup.cpp16
-rw-r--r--kalarm/lib/buttongroup.h29
-rw-r--r--kalarm/lib/checkbox.cpp20
-rw-r--r--kalarm/lib/checkbox.h13
-rw-r--r--kalarm/lib/colourcombo.cpp12
-rw-r--r--kalarm/lib/colourcombo.h9
-rw-r--r--kalarm/lib/colourlist.cpp4
-rw-r--r--kalarm/lib/colourlist.h16
-rw-r--r--kalarm/lib/combobox.cpp12
-rw-r--r--kalarm/lib/combobox.h11
-rw-r--r--kalarm/lib/dateedit.cpp6
-rw-r--r--kalarm/lib/dateedit.h15
-rw-r--r--kalarm/lib/datetime.cpp2
-rw-r--r--kalarm/lib/datetime.h6
-rw-r--r--kalarm/lib/label.cpp20
-rw-r--r--kalarm/lib/label.h20
-rw-r--r--kalarm/lib/lineedit.cpp14
-rw-r--r--kalarm/lib/lineedit.h15
-rw-r--r--kalarm/lib/messagebox.cpp12
-rw-r--r--kalarm/lib/messagebox.h14
-rw-r--r--kalarm/lib/pushbutton.cpp24
-rw-r--r--kalarm/lib/pushbutton.h19
-rw-r--r--kalarm/lib/radiobutton.cpp22
-rw-r--r--kalarm/lib/radiobutton.h13
-rw-r--r--kalarm/lib/shellprocess.cpp22
-rw-r--r--kalarm/lib/shellprocess.h9
-rw-r--r--kalarm/lib/slider.cpp16
-rw-r--r--kalarm/lib/slider.h23
-rw-r--r--kalarm/lib/spinbox.cpp36
-rw-r--r--kalarm/lib/spinbox.h11
-rw-r--r--kalarm/lib/spinbox2.cpp16
-rw-r--r--kalarm/lib/spinbox2.h25
-rw-r--r--kalarm/lib/spinbox2private.h16
-rw-r--r--kalarm/lib/synchtimer.cpp2
-rw-r--r--kalarm/lib/synchtimer.h5
-rw-r--r--kalarm/lib/timeedit.cpp4
-rw-r--r--kalarm/lib/timeedit.h9
-rw-r--r--kalarm/lib/timeperiod.cpp4
-rw-r--r--kalarm/lib/timeperiod.h9
-rw-r--r--kalarm/lib/timespinbox.cpp22
-rw-r--r--kalarm/lib/timespinbox.h9
41 files changed, 302 insertions, 280 deletions
diff --git a/kalarm/lib/buttongroup.cpp b/kalarm/lib/buttongroup.cpp
index 018640123..b8528316c 100644
--- a/kalarm/lib/buttongroup.cpp
+++ b/kalarm/lib/buttongroup.cpp
@@ -26,26 +26,26 @@
#include "buttongroup.moc"
-ButtonGroup::ButtonGroup(TQWidget* parent, const char* name)
- : TQButtonGroup(parent, name)
+ButtonGroup::ButtonGroup(TQWidget* tqparent, const char* name)
+ : TQButtonGroup(tqparent, name)
{
connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(const TQString& title, TQWidget* parent, const char* name)
- : TQButtonGroup(title, parent, name)
+ButtonGroup::ButtonGroup(const TQString& title, TQWidget* tqparent, const char* name)
+ : TQButtonGroup(title, tqparent, name)
{
connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, TQWidget* parent, const char* name)
- : TQButtonGroup(strips, orient, parent, name)
+ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, TQWidget* tqparent, const char* name)
+ : TQButtonGroup(strips, orient, tqparent, name)
{
connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* parent, const char* name)
- : TQButtonGroup(strips, orient, title, parent, name)
+ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* tqparent, const char* name)
+ : TQButtonGroup(strips, orient, title, tqparent, name)
{
connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
diff --git a/kalarm/lib/buttongroup.h b/kalarm/lib/buttongroup.h
index 8fbadae77..9d4a8886a 100644
--- a/kalarm/lib/buttongroup.h
+++ b/kalarm/lib/buttongroup.h
@@ -1,5 +1,5 @@
/*
- * buttongroup.h - TQButtonGroup with an extra signal and Qt 2 compatibility
+ * buttongroup.h - TQButtonGroup with an extra signal and TQt 2 compatibility
* Program: kalarm
* Copyright © 2002,2004,2006 by David Jarvie <software@astrojar.org.uk>
*
@@ -24,47 +24,48 @@
/**
- * @short A TQButtonGroup with signal on new selection, plus Qt 2 compatibility.
+ * @short A TQButtonGroup with signal on new selection, plus TQt 2 compatibility.
*
* The ButtonGroup class provides an enhanced version of the TQButtonGroup class.
*
* It emits an additional signal, buttonSet(int), whenever any of its buttons
* changes state, for whatever reason, including programmatic control. (The
* TQButtonGroup class only emits signals when buttons are clicked on by the user.)
- * The class also provides Qt 2 compatibility.
+ * The class also provides TQt 2 compatibility.
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class ButtonGroup : public QButtonGroup
+class ButtonGroup : public TQButtonGroup
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit ButtonGroup(TQWidget* parent, const char* name = 0);
+ explicit ButtonGroup(TQWidget* tqparent, const char* name = 0);
/** Constructor.
* @param title The title displayed for this button group.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(const TQString& title, TQWidget* parent, const char* name = 0);
+ ButtonGroup(const TQString& title, TQWidget* tqparent, const char* name = 0);
/** Constructor.
* @param strips The number of rows or columns of buttons.
- * @param orient The orientation (Qt::Horizontal or Qt::Vertical) of the button group.
- * @param parent The parent object of this widget.
+ * @param orient The orientation (TQt::Horizontal or TQt::Vertical) of the button group.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(int strips, Qt::Orientation orient, TQWidget* parent, const char* name = 0);
+ ButtonGroup(int strips, Qt::Orientation orient, TQWidget* tqparent, const char* name = 0);
/** Constructor.
* @param strips The number of rows or columns of buttons.
- * @param orient The orientation (Qt::Horizontal or Qt::Vertical) of the button group.
+ * @param orient The orientation (TQt::Horizontal or TQt::Vertical) of the button group.
* @param title The title displayed for this button group.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* parent, const char* name = 0);
+ ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* tqparent, const char* name = 0);
/** Inserts a button in the group.
* This overrides the insert() method of TQButtonGroup, which should really be a virtual method...
* @param button The button to insert.
diff --git a/kalarm/lib/checkbox.cpp b/kalarm/lib/checkbox.cpp
index dde0d10ff..cff6cdb17 100644
--- a/kalarm/lib/checkbox.cpp
+++ b/kalarm/lib/checkbox.cpp
@@ -21,15 +21,15 @@
#include "checkbox.moc"
-CheckBox::CheckBox(TQWidget* parent, const char* name)
- : TQCheckBox(parent, name),
+CheckBox::CheckBox(TQWidget* tqparent, const char* name)
+ : TQCheckBox(tqparent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
{ }
-CheckBox::CheckBox(const TQString& text, TQWidget* parent, const char* name)
- : TQCheckBox(text, parent, name),
+CheckBox::CheckBox(const TQString& text, TQWidget* tqparent, const char* name)
+ : TQCheckBox(text, tqparent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
@@ -86,7 +86,7 @@ void CheckBox::mousePressEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQCheckBox::mousePressEvent(e);
@@ -97,7 +97,7 @@ void CheckBox::mouseReleaseEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQCheckBox::mouseReleaseEvent(e);
@@ -114,10 +114,10 @@ void CheckBox::keyPressEvent(TQKeyEvent* e)
if (mReadOnly)
switch (e->key())
{
- case Qt::Key_Up:
- case Qt::Key_Left:
- case Qt::Key_Right:
- case Qt::Key_Down:
+ case TQt::Key_Up:
+ case TQt::Key_Left:
+ case TQt::Key_Right:
+ case TQt::Key_Down:
// Process keys which shift the focus
break;
default:
diff --git a/kalarm/lib/checkbox.h b/kalarm/lib/checkbox.h
index 389e66231..6b6985cd6 100644
--- a/kalarm/lib/checkbox.h
+++ b/kalarm/lib/checkbox.h
@@ -39,21 +39,22 @@
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class CheckBox : public QCheckBox
+class CheckBox : public TQCheckBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit CheckBox(TQWidget* parent, const char* name = 0);
+ explicit CheckBox(TQWidget* tqparent, const char* name = 0);
/** Constructor.
* @param text Text to display.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- CheckBox(const TQString& text, TQWidget* parent, const char* name = 0);
+ CheckBox(const TQString& text, TQWidget* tqparent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the check box is read-only for the user. If read-only,
@@ -79,7 +80,7 @@ class CheckBox : public QCheckBox
protected slots:
void slotClicked();
private:
- TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QCheckBox
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the TQCheckBox
TQWidget* mFocusWidget; // widget to receive focus when button is clicked on
bool mFocusWidgetEnable; // enable focus widget before setting focus
bool mReadOnly; // value cannot be changed
diff --git a/kalarm/lib/colourcombo.cpp b/kalarm/lib/colourcombo.cpp
index 0345104e0..769e6518b 100644
--- a/kalarm/lib/colourcombo.cpp
+++ b/kalarm/lib/colourcombo.cpp
@@ -30,8 +30,8 @@
#include "colourcombo.moc"
-ColourCombo::ColourCombo(TQWidget* parent, const char* name, const TQColor& defaultColour)
- : TQComboBox(parent, name),
+ColourCombo::ColourCombo(TQWidget* tqparent, const char* name, const TQColor& defaultColour)
+ : TQComboBox(tqparent, name),
mColourList(Preferences::messageColours()),
mSelectedColour(defaultColour),
mCustomColour(255, 255, 255),
@@ -169,9 +169,9 @@ void ColourCombo::drawCustomItem(TQRect& rect, bool insert)
{
TQPen pen;
if (tqGray(mCustomColour.rgb()) < 128)
- pen.setColor(Qt::white);
+ pen.setColor(TQt::white);
else
- pen.setColor(Qt::black);
+ pen.setColor(TQt::black);
TQPainter painter;
TQFontMetrics fm = TQFontMetrics(painter.font());
@@ -208,7 +208,7 @@ void ColourCombo::mousePressEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQComboBox::mousePressEvent(e);
@@ -228,7 +228,7 @@ void ColourCombo::mouseMoveEvent(TQMouseEvent* e)
void ColourCombo::keyPressEvent(TQKeyEvent* e)
{
- if (!mReadOnly || e->key() == Qt::Key_Escape)
+ if (!mReadOnly || e->key() == TQt::Key_Escape)
TQComboBox::keyPressEvent(e);
}
diff --git a/kalarm/lib/colourcombo.h b/kalarm/lib/colourcombo.h
index b05f78823..31fcdbdcc 100644
--- a/kalarm/lib/colourcombo.h
+++ b/kalarm/lib/colourcombo.h
@@ -40,17 +40,18 @@
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class ColourCombo : public QComboBox
+class ColourCombo : public TQComboBox
{
Q_OBJECT
- Q_PROPERTY(TQColor color READ color WRITE setColor)
+ TQ_OBJECT
+ TQ_PROPERTY(TQColor color READ color WRITE setColor)
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
* @param defaultColour The colour which is selected by default.
*/
- explicit ColourCombo(TQWidget* parent = 0, const char* name = 0, const TQColor& defaultColour = 0xFFFFFF);
+ explicit ColourCombo(TQWidget* tqparent = 0, const char* name = 0, const TQColor& defaultColour = 0xFFFFFF);
/** Returns the selected colour. */
TQColor color() const { return mSelectedColour; }
/** Returns the selected colour. */
diff --git a/kalarm/lib/colourlist.cpp b/kalarm/lib/colourlist.cpp
index 93886b5fa..77bdaa9d1 100644
--- a/kalarm/lib/colourlist.cpp
+++ b/kalarm/lib/colourlist.cpp
@@ -29,8 +29,8 @@ ColourList::ColourList(const TQColor* colours)
void ColourList::insert(const TQColor& colour)
{
- QRgb rgb = colour.rgb();
- for (TQValueListIterator<QRgb> it = mList.begin(); it != mList.end(); ++it)
+ TQRgb rgb = colour.rgb();
+ for (TQValueListIterator<TQRgb> it = mList.begin(); it != mList.end(); ++it)
{
if (rgb <= *it)
{
diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h
index 8ec2b2a94..7bee8d149 100644
--- a/kalarm/lib/colourlist.h
+++ b/kalarm/lib/colourlist.h
@@ -32,7 +32,7 @@
* The ColourList class holds a list of colours, sorted in RGB value order.
*
* It provides a sorted TQValueList of colours in RGB value order, with iterators
- * and other access methods which return either QRgb or TQColor objects.
+ * and other access methods which return either TQRgb or TQColor objects.
*
* @author David Jarvie <software@astrojar.org.uk>
*/
@@ -40,14 +40,14 @@ class ColourList
{
public:
typedef size_t size_type;
- typedef TQValueListConstIterator<QRgb> const_iterator;
+ typedef TQValueListConstIterator<TQRgb> const_iterator;
/** Constructs an empty list. */
ColourList() { }
/** Copy constructor. */
ColourList(const ColourList& l) : mList(l.mList) { }
/** Constructs a list whose values are preset to the colours in @p list. */
- ColourList(const TQValueList<QRgb>& list) : mList(list) { qHeapSort(mList); }
+ ColourList(const TQValueList<TQRgb>& list) : mList(list) { qHeapSort(mList); }
/** Constructs a list whose values are preset to the colours in the @p list.
* Terminate @p list by an invalid colour.
*/
@@ -55,7 +55,7 @@ class ColourList
/** Assignment operator. */
ColourList& operator=(const ColourList& l) { mList = l.mList; return *this; }
/** Sets the list to comprise the colours in @p list. */
- ColourList& operator=(const TQValueList<QRgb>& list) { mList = list; qHeapSort(mList); return *this; }
+ ColourList& operator=(const TQValueList<TQRgb>& list) { mList = list; qHeapSort(mList); return *this; }
/** Removes all values from the list. */
void clear() { mList.clear(); }
/** Adds the specified colour @p c to the list. */
@@ -82,16 +82,16 @@ class ColourList
const_iterator fromLast() const { return mList.fromLast(); }
/** Returns an iterator pointing to the colour at position @p i in the list. */
const_iterator at(size_type i) const { return mList.at(i); }
- /** Returns true if the list tqcontains the colour @p c. */
+ /** Returns true if the list contains the colour @p c. */
size_type tqcontains(const TQColor& c) const { return mList.tqcontains(c.rgb()); }
/** Returns an iterator pointing to the first occurrence of colour @p c in the list.
* Returns end() if colour @p c is not in the list.
*/
- const_iterator find(const TQColor& c) const { return mList.find(c.rgb()); }
+ const_iterator tqfind(const TQColor& c) const { return mList.tqfind(c.rgb()); }
/** Returns an iterator pointing to the first occurrence of colour @p c in the list, starting.
* from position @p it. Returns end() if colour @p c is not in the list.
*/
- const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); }
+ const_iterator tqfind(const_iterator it, const TQColor& c) const { return mList.tqfind(it, c.rgb()); }
/** Returns the index to the first occurrence of colour @p c in the list.
* Returns -1 if colour @p c is not in the list.
*/
@@ -104,7 +104,7 @@ class ColourList
TQColor operator[](size_type i) const { return TQColor(mList[i]); }
private:
void sort();
- TQValueList<QRgb> mList;
+ TQValueList<TQRgb> mList;
};
#endif // COLOURLIST_H
diff --git a/kalarm/lib/combobox.cpp b/kalarm/lib/combobox.cpp
index bb232ffe5..0c526cae3 100644
--- a/kalarm/lib/combobox.cpp
+++ b/kalarm/lib/combobox.cpp
@@ -22,13 +22,13 @@
#include "combobox.moc"
-ComboBox::ComboBox(TQWidget* parent, const char* name)
- : TQComboBox(parent, name),
+ComboBox::ComboBox(TQWidget* tqparent, const char* name)
+ : TQComboBox(tqparent, name),
mReadOnly(false)
{ }
-ComboBox::ComboBox(bool rw, TQWidget* parent, const char* name)
- : TQComboBox(rw, parent, name),
+ComboBox::ComboBox(bool rw, TQWidget* tqparent, const char* name)
+ : TQComboBox(rw, tqparent, name),
mReadOnly(false)
{ }
@@ -47,7 +47,7 @@ void ComboBox::mousePressEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQComboBox::mousePressEvent(e);
@@ -67,7 +67,7 @@ void ComboBox::mouseMoveEvent(TQMouseEvent* e)
void ComboBox::keyPressEvent(TQKeyEvent* e)
{
- if (!mReadOnly || e->key() == Qt::Key_Escape)
+ if (!mReadOnly || e->key() == TQt::Key_Escape)
TQComboBox::keyPressEvent(e);
}
diff --git a/kalarm/lib/combobox.h b/kalarm/lib/combobox.h
index 3f33a63db..5f8f4cc3c 100644
--- a/kalarm/lib/combobox.h
+++ b/kalarm/lib/combobox.h
@@ -34,21 +34,22 @@
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class ComboBox : public QComboBox
+class ComboBox : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit ComboBox(TQWidget* parent = 0, const char* name = 0);
+ explicit ComboBox(TQWidget* tqparent = 0, const char* name = 0);
/** Constructor.
* @param rw True for a read-write combo box, false for a read-only combo box.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit ComboBox(bool rw, TQWidget* parent = 0, const char* name = 0);
+ explicit ComboBox(bool rw, TQWidget* tqparent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the combo box is read-only for the user. If read-only,
diff --git a/kalarm/lib/dateedit.cpp b/kalarm/lib/dateedit.cpp
index 2cc106982..38a6a5cba 100644
--- a/kalarm/lib/dateedit.cpp
+++ b/kalarm/lib/dateedit.cpp
@@ -25,8 +25,8 @@
#include "dateedit.moc"
-DateEdit::DateEdit(TQWidget* parent, const char* name)
- : KDateEdit(parent, name)
+DateEdit::DateEdit(TQWidget* tqparent, const char* name)
+ : KDateEdit(tqparent, name)
{
connect(this, TQT_SIGNAL(dateEntered(const TQDate&)), TQT_SLOT(newDateEntered(const TQDate&)));
}
@@ -91,7 +91,7 @@ void DateEdit::mousePressEvent(TQMouseEvent *e)
if (isReadOnly())
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
KDateEdit::mousePressEvent(e);
diff --git a/kalarm/lib/dateedit.h b/kalarm/lib/dateedit.h
index 7ea09e01b..7ad0a7a05 100644
--- a/kalarm/lib/dateedit.h
+++ b/kalarm/lib/dateedit.h
@@ -37,13 +37,14 @@
class DateEdit : public KDateEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit DateEdit(TQWidget* parent = 0, const char* name = 0);
- /** Returns true if the widget tqcontains a valid date. */
+ explicit DateEdit(TQWidget* tqparent = 0, const char* name = 0);
+ /** Returns true if the widget contains a valid date. */
bool isValid() const { return date().isValid(); }
/** Returns the earliest date which can be entered.
* If there is no minimum date, returns an invalid date.
@@ -56,15 +57,15 @@ class DateEdit : public KDateEdit
/** Sets the earliest date which can be entered.
* @param date Earliest date allowed. If invalid, any minimum limit is removed.
* @param errorDate Error message to be displayed when a date earlier than
- * @p date is entered. Set to TQString::null to use the default error message.
+ * @p date is entered. Set to TQString() to use the default error message.
*/
- void setMinDate(const TQDate& date, const TQString& errorDate = TQString::null);
+ void setMinDate(const TQDate& date, const TQString& errorDate = TQString());
/** Sets the latest date which can be entered.
* @param date Latest date allowed. If invalid, any maximum limit is removed.
* @param errorDate Error message to be displayed when a date later than
- * @p date is entered. Set to TQString::null to use the default error message.
+ * @p date is entered. Set to TQString() to use the default error message.
*/
- void setMaxDate(const TQDate& date, const TQString& errorDate = TQString::null);
+ void setMaxDate(const TQDate& date, const TQString& errorDate = TQString());
/** Sets the date held in the widget to an invalid date. */
void setInvalid();
diff --git a/kalarm/lib/datetime.cpp b/kalarm/lib/datetime.cpp
index 3ebaccd30..e9dae4140 100644
--- a/kalarm/lib/datetime.cpp
+++ b/kalarm/lib/datetime.cpp
@@ -43,7 +43,7 @@ TQString DateTime::formatLocale(bool shortFormat) const
else if (mTimeValid)
return KGlobal::locale()->formatDateTime(mDateTime, shortFormat);
else
- return TQString::null;
+ return TQString();
}
bool operator==(const DateTime& dt1, const DateTime& dt2)
diff --git a/kalarm/lib/datetime.h b/kalarm/lib/datetime.h
index eb40d6b5c..976bada90 100644
--- a/kalarm/lib/datetime.h
+++ b/kalarm/lib/datetime.h
@@ -169,14 +169,14 @@ class DateTime
* If it is a date-time, both time and date are included in the output.
* If it is date-only, only the date is included in the output.
*/
- TQString toString(Qt::DateFormat f = Qt::TextDate) const
+ TQString toString(TQt::DateFormat f = TQt::TextDate) const
{
if (mDateOnly)
return mDateTime.date().toString(f);
else if (mTimeValid)
return mDateTime.toString(f);
else
- return TQString::null;
+ return TQString();
}
/** Returns the value as a string.
* If it is a date-time, both time and date are included in the output.
@@ -189,7 +189,7 @@ class DateTime
else if (mTimeValid)
return mDateTime.toString(format);
else
- return TQString::null;
+ return TQString();
}
/** Returns the value as a string, formatted according to the user's locale.
* If it is a date-time, both time and date are included in the output.
diff --git a/kalarm/lib/label.cpp b/kalarm/lib/label.cpp
index ad6fd7832..d2b18ba10 100644
--- a/kalarm/lib/label.cpp
+++ b/kalarm/lib/label.cpp
@@ -23,20 +23,20 @@
#include "label.moc"
-Label::Label(TQWidget* parent, const char* name, WFlags f)
- : TQLabel(parent, name, f),
+Label::Label(TQWidget* tqparent, const char* name, WFlags f)
+ : TQLabel(tqparent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
-Label::Label(const TQString& text, TQWidget* parent, const char* name, WFlags f)
- : TQLabel(text, parent, name, f),
+Label::Label(const TQString& text, TQWidget* tqparent, const char* name, WFlags f)
+ : TQLabel(text, tqparent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
-Label::Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name, WFlags f)
- : TQLabel(buddy, text, parent, name, f),
+Label::Label(TQWidget* buddy, const TQString& text, TQWidget* tqparent, const char* name, WFlags f)
+ : TQLabel(buddy, text, tqparent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
@@ -103,8 +103,8 @@ void Label::activated()
* Class: LabelFocusWidget
=============================================================================*/
-LabelFocusWidget::LabelFocusWidget(TQWidget* parent, const char* name)
- : TQWidget(parent, name)
+LabelFocusWidget::LabelFocusWidget(TQWidget* tqparent, const char* name)
+ : TQWidget(tqparent, name)
{
setFocusPolicy(ClickFocus);
setFixedSize(TQSize(1,1));
@@ -112,7 +112,7 @@ LabelFocusWidget::LabelFocusWidget(TQWidget* parent, const char* name)
void LabelFocusWidget::focusInEvent(TQFocusEvent*)
{
- Label* parent = (Label*)tqparentWidget();
- parent->activated();
+ Label* tqparent = (Label*)tqparentWidget();
+ tqparent->activated();
}
diff --git a/kalarm/lib/label.h b/kalarm/lib/label.h
index d5f46c4fe..bd0e39035 100644
--- a/kalarm/lib/label.h
+++ b/kalarm/lib/label.h
@@ -38,35 +38,36 @@ class LabelFocusWidget;
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class Label : public QLabel
+class Label : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
friend class LabelFocusWidget;
public:
/** Constructs an empty label.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
* @param f Flags. See TQWidget constructor for details.
*/
- explicit Label(TQWidget* parent, const char* name = 0, WFlags f = 0);
+ explicit Label(TQWidget* tqparent, const char* name = 0, WFlags f = 0);
/** Constructs a label that displays @p text.
* @param text Text string to display.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
* @param f Flags. See TQWidget constructor for details.
*/
- Label(const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
+ Label(const TQString& text, TQWidget* tqparent, const char* name = 0, WFlags f = 0);
/** Constructs a label, with a buddy widget, that displays @p text.
* @param buddy Buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio
* button, @p buddy is in addition selected when the
* accelerator key is pressed.
* @param text Text string to display.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
* @param f Flags. See TQWidget constructor for details.
*/
- Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
+ Label(TQWidget* buddy, const TQString& text, TQWidget* tqparent, const char* name = 0, WFlags f = 0);
/** Sets the label's buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio button,
* @p buddy is in addition selected when the accelerator key is pressed.
@@ -84,11 +85,12 @@ class Label : public QLabel
// Private class for use by Label
-class LabelFocusWidget : public QWidget
+class LabelFocusWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- LabelFocusWidget(TQWidget* parent, const char* name = 0);
+ LabelFocusWidget(TQWidget* tqparent, const char* name = 0);
protected:
virtual void focusInEvent(TQFocusEvent*);
};
diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp
index 4dcdc15f8..d85a99458 100644
--- a/kalarm/lib/lineedit.cpp
+++ b/kalarm/lib/lineedit.cpp
@@ -39,8 +39,8 @@
* It has an option to prevent its contents being selected when it receives
= focus.
=============================================================================*/
-LineEdit::LineEdit(Type type, TQWidget* parent, const char* name)
- : KLineEdit(parent, name),
+LineEdit::LineEdit(Type type, TQWidget* tqparent, const char* name)
+ : KLineEdit(tqparent, name),
mType(type),
mNoSelect(false),
mSetCursorAtEnd(false)
@@ -48,8 +48,8 @@ LineEdit::LineEdit(Type type, TQWidget* parent, const char* name)
init();
}
-LineEdit::LineEdit(TQWidget* parent, const char* name)
- : KLineEdit(parent, name),
+LineEdit::LineEdit(TQWidget* tqparent, const char* name)
+ : KLineEdit(tqparent, name),
mType(Text),
mNoSelect(false),
mSetCursorAtEnd(false)
@@ -122,7 +122,7 @@ void LineEdit::dropEvent(TQDropEvent* e)
if (mType == Emails)
newText = mailList.first().from();
else
- setText(mailList.first().subject()); // tqreplace any existing text
+ setText(mailList.first().subject()); // replace any existing text
}
}
// This must come before KURLDrag
@@ -144,7 +144,7 @@ void LineEdit::dropEvent(TQDropEvent* e)
{
case Url:
// URL entry field - ignore all but the first dropped URL
- setText(files.first().prettyURL()); // tqreplace any existing text
+ setText(files.first().prettyURL()); // replace any existing text
break;
case Emails:
{
@@ -181,7 +181,7 @@ void LineEdit::dropEvent(TQDropEvent* e)
}
else
{
- int newline = txt.find('\n');
+ int newline = txt.tqfind('\n');
newText = (newline >= 0) ? txt.left(newline) : txt;
}
}
diff --git a/kalarm/lib/lineedit.h b/kalarm/lib/lineedit.h
index 5d36de3c5..0da536835 100644
--- a/kalarm/lib/lineedit.h
+++ b/kalarm/lib/lineedit.h
@@ -43,16 +43,17 @@
class LineEdit : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Types of drag and drop content which will be accepted.
- * @li Text - the line edit tqcontains general text. It accepts text, a URL
+ * @li Text - the line edit contains general text. It accepts text, a URL
* or an email from KMail (the subject line is used). If multiple
* URLs or emails are dropped, only the first is used; the
* rest are ignored.
- * @li Url - the line edit tqcontains a URL. It accepts text or a URL. If
+ * @li Url - the line edit contains a URL. It accepts text or a URL. If
* multiple URLs are dropped, only the first URL is used; the
* rest are ignored.
- * @li Emails - the line edit tqcontains email addresses. It accepts text,
+ * @li Emails - the line edit contains email addresses. It accepts text,
* mailto: URLs, emails from KMail (the From address is used)
* or vcard data (e.g. from KAddressBook). If multiple emails
* are dropped, only the first is used; the rest are ignored.
@@ -61,15 +62,15 @@ class LineEdit : public KLineEdit
enum Type { Text, Url, Emails };
/** Constructor.
* @param type The content type for the line edit.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit LineEdit(Type type, TQWidget* parent = 0, const char* name = 0);
+ explicit LineEdit(Type type, TQWidget* tqparent = 0, const char* name = 0);
/** Constructs a line edit whose content type is Text.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit LineEdit(TQWidget* parent = 0, const char* name = 0);
+ explicit LineEdit(TQWidget* tqparent = 0, const char* name = 0);
/** Prevents the line edit's contents being selected when the widget receives focus. */
void setNoSelect() { mNoSelect = true; }
/** Sets whether the cursor should be set at the beginning or end of the text when
diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp
index 3345c9c4b..dced4ce6a 100644
--- a/kalarm/lib/messagebox.cpp
+++ b/kalarm/lib/messagebox.cpp
@@ -45,7 +45,7 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAg
ButtonCode defaultButton = Continue;
if (!dontAskAgainName.isEmpty())
{
- TQMap<TQString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName);
+ TQMap<TQString, ButtonCode>::ConstIterator it = mContinueDefaults.tqfind(dontAskAgainName);
if (it != mContinueDefaults.end())
defaultButton = it.data();
}
@@ -60,11 +60,11 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAg
* warningContinueCancel() for that 'dontAskAgainName' value. If neither method
* has set a default button, Continue is the default.
*/
-int MessageBox::warningContinueCancel(TQWidget* parent, const TQString& text, const TQString& caption,
+int MessageBox::warningContinueCancel(TQWidget* tqparent, const TQString& text, const TQString& caption,
const KGuiItem& buttonContinue, const TQString& dontAskAgainName)
{
ButtonCode defaultButton = getContinueDefault(dontAskAgainName);
- return warningContinueCancel(parent, defaultButton, text, caption, buttonContinue, dontAskAgainName);
+ return warningContinueCancel(tqparent, defaultButton, text, caption, buttonContinue, dontAskAgainName);
}
/******************************************************************************
@@ -72,13 +72,13 @@ int MessageBox::warningContinueCancel(TQWidget* parent, const TQString& text, co
* If 'dontAskAgainName' is specified, the message box will only be suppressed
* if the user chose Continue last time.
*/
-int MessageBox::warningContinueCancel(TQWidget* parent, ButtonCode defaultButton, const TQString& text,
+int MessageBox::warningContinueCancel(TQWidget* tqparent, ButtonCode defaultButton, const TQString& text,
const TQString& caption, const KGuiItem& buttonContinue,
const TQString& dontAskAgainName)
{
setContinueDefault(dontAskAgainName, defaultButton);
if (defaultButton != Cancel)
- return KMessageBox::warningContinueCancel(parent, text, caption, buttonContinue, dontAskAgainName);
+ return KMessageBox::warningContinueCancel(tqparent, text, caption, buttonContinue, dontAskAgainName);
// Cancel is the default button, so we have to use KMessageBox::warningYesNo()
if (!dontAskAgainName.isEmpty())
@@ -92,7 +92,7 @@ int MessageBox::warningContinueCancel(TQWidget* parent, ButtonCode defaultButton
saveDontShowAgain(dontAskAgainName, true, false);
}
}
- return warningYesNo(parent, text, caption, buttonContinue, KStdGuiItem::cancel(), dontAskAgainName);
+ return warningYesNo(tqparent, text, caption, buttonContinue, KStdGuiItem::cancel(), dontAskAgainName);
}
/******************************************************************************
diff --git a/kalarm/lib/messagebox.h b/kalarm/lib/messagebox.h
index 6d65b0934..21d321b13 100644
--- a/kalarm/lib/messagebox.h
+++ b/kalarm/lib/messagebox.h
@@ -58,7 +58,7 @@ class MessageBox : public KMessageBox
*/
static void setContinueDefault(const TQString& dontAskAgainName, ButtonCode defaultButton);
/** Displays a Continue/Cancel message box with the option as to which button is the default.
- * @param parent Parent widget
+ * @param tqparent Parent widget
* @param defaultButton The default button for the message box. Valid values are Continue or Cancel.
* @param text Message string
* @param caption Caption (window title) of the message box
@@ -66,12 +66,12 @@ class MessageBox : public KMessageBox
* @param dontAskAgainName If specified, the message box will only be suppressed
* if the user chose Continue last time.
*/
- static int warningContinueCancel(TQWidget* parent, ButtonCode defaultButton, const TQString& text,
- const TQString& caption = TQString::null,
+ static int warningContinueCancel(TQWidget* tqparent, ButtonCode defaultButton, const TQString& text,
+ const TQString& caption = TQString(),
const KGuiItem& buttonContinue = KStdGuiItem::cont(),
- const TQString& dontAskAgainName = TQString::null);
+ const TQString& dontAskAgainName = TQString());
/** Displays a Continue/Cancel message box.
- * @param parent Parent widget
+ * @param tqparent Parent widget
* @param text Message string
* @param caption Caption (window title) of the message box
* @param buttonContinue The text for the first button (default = i18n("Continue"))
@@ -81,9 +81,9 @@ class MessageBox : public KMessageBox
* @p dontAskAgainName value. If neither method has been used to set a default button,
* Continue is the default.
*/
- static int warningContinueCancel(TQWidget* parent, const TQString& text, const TQString& caption = TQString::null,
+ static int warningContinueCancel(TQWidget* tqparent, const TQString& text, const TQString& caption = TQString(),
const KGuiItem& buttonContinue = KStdGuiItem::cont(),
- const TQString& dontAskAgainName = TQString::null);
+ const TQString& dontAskAgainName = TQString());
/** If there is no current setting for whether a non-Yes/No message box should be
* shown, sets it to @p defaultShow.
* If a Continue/Cancel message box has Cancel as the default button, either
diff --git a/kalarm/lib/pushbutton.cpp b/kalarm/lib/pushbutton.cpp
index ed8440a05..e1e04099a 100644
--- a/kalarm/lib/pushbutton.cpp
+++ b/kalarm/lib/pushbutton.cpp
@@ -21,20 +21,20 @@
#include "pushbutton.moc"
-PushButton::PushButton(TQWidget* parent, const char* name)
- : TQPushButton(parent, name),
+PushButton::PushButton(TQWidget* tqparent, const char* name)
+ : TQPushButton(tqparent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
-PushButton::PushButton(const TQString& text, TQWidget* parent, const char* name)
- : TQPushButton(text, parent, name),
+PushButton::PushButton(const TQString& text, TQWidget* tqparent, const char* name)
+ : TQPushButton(text, tqparent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
-PushButton::PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name)
- : TQPushButton(icon, text, parent, name),
+PushButton::PushButton(const TQIconSet& icon, const TQString& text, TQWidget* tqparent, const char* name)
+ : TQPushButton(icon, text, tqparent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
@@ -55,7 +55,7 @@ void PushButton::mousePressEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQPushButton::mousePressEvent(e);
@@ -66,7 +66,7 @@ void PushButton::mouseReleaseEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQPushButton::mouseReleaseEvent(e);
@@ -83,10 +83,10 @@ void PushButton::keyPressEvent(TQKeyEvent* e)
if (mReadOnly)
switch (e->key())
{
- case Qt::Key_Up:
- case Qt::Key_Left:
- case Qt::Key_Right:
- case Qt::Key_Down:
+ case TQt::Key_Up:
+ case TQt::Key_Left:
+ case TQt::Key_Right:
+ case TQt::Key_Down:
// Process keys which shift the focus
break;
default:
diff --git a/kalarm/lib/pushbutton.h b/kalarm/lib/pushbutton.h
index 8d82ac96e..615ea10cb 100644
--- a/kalarm/lib/pushbutton.h
+++ b/kalarm/lib/pushbutton.h
@@ -34,29 +34,30 @@
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class PushButton : public QPushButton
+class PushButton : public TQPushButton
{
Q_OBJECT
- Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
+ TQ_OBJECT
+ TQ_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit PushButton(TQWidget* parent, const char* name = 0);
+ explicit PushButton(TQWidget* tqparent, const char* name = 0);
/** Constructor for a push button which displays a text.
* @param text The text to show on the button.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- PushButton(const TQString& text, TQWidget* parent, const char* name = 0);
+ PushButton(const TQString& text, TQWidget* tqparent, const char* name = 0);
/** Constructor for a push button which displays an icon and a text.
* @param icon The icon to show on the button.
* @param text The text to show on the button.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name = 0);
+ PushButton(const TQIconSet& icon, const TQString& text, TQWidget* tqparent, const char* name = 0);
/** Sets whether the push button is read-only for the user.
* @param readOnly True to set the widget read-only, false to enable its action.
*/
@@ -70,7 +71,7 @@ class PushButton : public QPushButton
virtual void keyPressEvent(TQKeyEvent*);
virtual void keyReleaseEvent(TQKeyEvent*);
private:
- TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QPushButton
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the TQPushButton
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/radiobutton.cpp b/kalarm/lib/radiobutton.cpp
index 7cf58f082..d08097887 100644
--- a/kalarm/lib/radiobutton.cpp
+++ b/kalarm/lib/radiobutton.cpp
@@ -21,15 +21,15 @@
#include "radiobutton.moc"
-RadioButton::RadioButton(TQWidget* parent, const char* name)
- : TQRadioButton(parent, name),
+RadioButton::RadioButton(TQWidget* tqparent, const char* name)
+ : TQRadioButton(tqparent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
{ }
-RadioButton::RadioButton(const TQString& text, TQWidget* parent, const char* name)
- : TQRadioButton(text, parent, name),
+RadioButton::RadioButton(const TQString& text, TQWidget* tqparent, const char* name)
+ : TQRadioButton(text, tqparent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
@@ -86,7 +86,7 @@ void RadioButton::mousePressEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQRadioButton::mousePressEvent(e);
@@ -97,7 +97,7 @@ void RadioButton::mouseReleaseEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQRadioButton::mouseReleaseEvent(e);
@@ -114,12 +114,12 @@ void RadioButton::keyPressEvent(TQKeyEvent* e)
if (mReadOnly)
switch (e->key())
{
- case Qt::Key_Up:
- case Qt::Key_Left:
- case Qt::Key_Right:
- case Qt::Key_Down:
+ case TQt::Key_Up:
+ case TQt::Key_Left:
+ case TQt::Key_Right:
+ case TQt::Key_Down:
// Process keys which shift the focus
- case Qt::Key_Escape:
+ case TQt::Key_Escape:
break;
default:
return;
diff --git a/kalarm/lib/radiobutton.h b/kalarm/lib/radiobutton.h
index d95d13fa5..9395be608 100644
--- a/kalarm/lib/radiobutton.h
+++ b/kalarm/lib/radiobutton.h
@@ -39,21 +39,22 @@
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class RadioButton : public QRadioButton
+class RadioButton : public TQRadioButton
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit RadioButton(TQWidget* parent, const char* name = 0);
+ explicit RadioButton(TQWidget* tqparent, const char* name = 0);
/** Constructor.
* @param text Text to display.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- RadioButton(const TQString& text, TQWidget* parent, const char* name = 0);
+ RadioButton(const TQString& text, TQWidget* tqparent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the radio button is read-only for the user. If read-only,
@@ -79,7 +80,7 @@ class RadioButton : public QRadioButton
protected slots:
void slotClicked();
private:
- TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QRadioButton
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the TQRadioButton
TQWidget* mFocusWidget; // widget to receive focus when button is clicked on
bool mFocusWidgetEnable; // enable focus widget before setting focus
bool mReadOnly; // value cannot be changed
diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp
index 209f1aad8..09daf91db 100644
--- a/kalarm/lib/shellprocess.cpp
+++ b/kalarm/lib/shellprocess.cpp
@@ -40,7 +40,7 @@ bool ShellProcess::mAuthorised = false;
ShellProcess::ShellProcess(const TQString& command)
: KShellProcess(shellName()),
mCommand(command),
- mStatus(INACTIVE),
+ mtqStatus(INACTIVE),
mStdinExit(false)
{
}
@@ -52,7 +52,7 @@ bool ShellProcess::start(Communication comm)
{
if (!authorised())
{
- mStatus = UNAUTHORISED;
+ mtqStatus = UNAUTHORISED;
return false;
}
KShellProcess::operator<<(mCommand);
@@ -60,10 +60,10 @@ bool ShellProcess::start(Communication comm)
connect(this, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotExited(KProcess*)));
if (!KShellProcess::start(KProcess::NotifyOnExit, comm))
{
- mStatus = START_FAIL;
+ mtqStatus = START_FAIL;
return false;
}
- mStatus = RUNNING;
+ mtqStatus = RUNNING;
return true;
}
@@ -76,11 +76,11 @@ void ShellProcess::slotExited(KProcess* proc)
{
kdDebug(5950) << "ShellProcess::slotExited()\n";
mStdinQueue.clear();
- mStatus = SUCCESS;
+ mtqStatus = SUCCESS;
if (!proc->normalExit())
{
kdWarning(5950) << "ShellProcess::slotExited(" << mCommand << ") " << mShellName << ": died/killed\n";
- mStatus = DIED;
+ mtqStatus = DIED;
}
else
{
@@ -90,7 +90,7 @@ void ShellProcess::slotExited(KProcess* proc)
|| mShellName == "ksh" && status == 127)
{
kdWarning(5950) << "ShellProcess::slotExited(" << mCommand << ") " << mShellName << ": not found or not executable\n";
- mStatus = NOT_FOUND;
+ mtqStatus = NOT_FOUND;
}
}
emit shellExited(this);
@@ -140,7 +140,7 @@ void ShellProcess::stdinExit()
*/
TQString ShellProcess::errorMessage() const
{
- switch (mStatus)
+ switch (mtqStatus)
{
case UNAUTHORISED:
return i18n("Failed to execute command (shell access not authorized):");
@@ -153,7 +153,7 @@ TQString ShellProcess::errorMessage() const
case RUNNING:
case SUCCESS:
default:
- return TQString::null;
+ return TQString();
}
}
@@ -174,8 +174,8 @@ const TQCString& ShellProcess::shellPath()
struct stat fileinfo;
if (stat(envshell.data(), &fileinfo) != -1 // ensure file exists
&& !S_ISDIR(fileinfo.st_mode) // and it's not a directory
- && !S_ISCHR(fileinfo.st_mode) // and it's not a character device
- && !S_ISBLK(fileinfo.st_mode) // and it's not a block device
+ && !S_ISCHR(fileinfo.st_mode) // and it's not a character tqdevice
+ && !S_ISBLK(fileinfo.st_mode) // and it's not a block tqdevice
#ifdef S_ISSOCK
&& !S_ISSOCK(fileinfo.st_mode) // and it's not a socket
#endif
diff --git a/kalarm/lib/shellprocess.h b/kalarm/lib/shellprocess.h
index a3b8a574b..fd303bea0 100644
--- a/kalarm/lib/shellprocess.h
+++ b/kalarm/lib/shellprocess.h
@@ -50,6 +50,7 @@
class ShellProcess : public KShellProcess
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Current status of the shell process.
* @li INACTIVE - start() has not yet been called to run the command.
@@ -60,7 +61,7 @@ class ShellProcess : public KShellProcess
* @li NOT_FOUND - the command was either not found or not executable.
* @li START_FAIL - the command couldn't be started for other reasons.
*/
- enum Status {
+ enum tqStatus {
INACTIVE, // start() has not yet been called to run the command
RUNNING, // command is currently running
SUCCESS, // command appears to have exited successfully
@@ -79,11 +80,11 @@ class ShellProcess : public KShellProcess
*/
bool start(Communication comm = NoCommunication);
/** Returns the current status of the shell process. */
- Status status() const { return mStatus; }
+ tqStatus status() const { return mtqStatus; }
/** Returns whether the command was run successfully.
* @return True if the command has been run and appears to have exited successfully.
*/
- bool normalExit() const { return mStatus == SUCCESS; }
+ bool normalExit() const { return mtqStatus == SUCCESS; }
/** Returns the command configured to be run. */
const TQString& command() const { return mCommand; }
/** Returns the error message corresponding to the command exit status.
@@ -131,7 +132,7 @@ class ShellProcess : public KShellProcess
static bool mAuthorised; // true if shell commands are authorised
TQString mCommand; // copy of command to be executed
TQValueList<TQCString> mStdinQueue; // queued strings to send to STDIN
- Status mStatus; // current execution status
+ tqStatus mtqStatus; // current execution status
bool mStdinExit; // exit once STDIN queue has been written
};
diff --git a/kalarm/lib/slider.cpp b/kalarm/lib/slider.cpp
index afe7d679c..0b30f744a 100644
--- a/kalarm/lib/slider.cpp
+++ b/kalarm/lib/slider.cpp
@@ -21,18 +21,18 @@
#include "slider.moc"
-Slider::Slider(TQWidget* parent, const char* name)
- : TQSlider(parent, name),
+Slider::Slider(TQWidget* tqparent, const char* name)
+ : TQSlider(tqparent, name),
mReadOnly(false)
{ }
-Slider::Slider(Orientation o, TQWidget* parent, const char* name)
- : TQSlider(o, parent, name),
+Slider::Slider(Qt::Orientation o, TQWidget* tqparent, const char* name)
+ : TQSlider(o, tqparent, name),
mReadOnly(false)
{ }
-Slider::Slider(int minval, int maxval, int pageStep, int value, Orientation o, TQWidget* parent, const char* name)
- : TQSlider(minval, maxval, pageStep, value, o, parent, name),
+Slider::Slider(int minval, int maxval, int pageStep, int value, Qt::Orientation o, TQWidget* tqparent, const char* name)
+ : TQSlider(minval, maxval, pageStep, value, o, tqparent, name),
mReadOnly(false)
{ }
@@ -54,7 +54,7 @@ void Slider::mousePressEvent(TQMouseEvent* e)
if (mReadOnly)
{
// Swallow up the event if it's the left button
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
return;
}
TQSlider::mousePressEvent(e);
@@ -74,7 +74,7 @@ void Slider::mouseMoveEvent(TQMouseEvent* e)
void Slider::keyPressEvent(TQKeyEvent* e)
{
- if (!mReadOnly || e->key() == Qt::Key_Escape)
+ if (!mReadOnly || e->key() == TQt::Key_Escape)
TQSlider::keyPressEvent(e);
}
diff --git a/kalarm/lib/slider.h b/kalarm/lib/slider.h
index 8fa54d452..f79ac0158 100644
--- a/kalarm/lib/slider.h
+++ b/kalarm/lib/slider.h
@@ -34,33 +34,34 @@
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class Slider : public QSlider
+class Slider : public TQSlider
{
Q_OBJECT
- Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
+ TQ_OBJECT
+ TQ_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit Slider(TQWidget* parent = 0, const char* name = 0);
+ explicit Slider(TQWidget* tqparent = 0, const char* name = 0);
/** Constructor.
- * @param orient The orientation of the slider, either Qt::Horizonal or Qt::Vertical.
- * @param parent The parent object of this widget.
+ * @param orient The orientation of the slider, either TQt::Horizonal or TQt::Vertical.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit Slider(Orientation orient, TQWidget* parent = 0, const char* name = 0);
+ explicit Slider(Qt::Orientation orient, TQWidget* tqparent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the slider can have.
* @param maxValue The maximum value which the slider can have.
* @param pageStep The page step increment.
* @param value The initial value for the slider.
- * @param orient The orientation of the slider, either Qt::Horizonal or Qt::Vertical.
- * @param parent The parent object of this widget.
+ * @param orient The orientation of the slider, either TQt::Horizonal or TQt::Vertical.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- Slider(int minValue, int maxValue, int pageStep, int value, Orientation orient,
- TQWidget* parent = 0, const char* name = 0);
+ Slider(int minValue, int maxValue, int pageStep, int value, Qt::Orientation orient,
+ TQWidget* tqparent = 0, const char* name = 0);
/** Returns true if the slider is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the slider is read-only for the user.
diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp
index 8ae5962a2..19608eabe 100644
--- a/kalarm/lib/spinbox.cpp
+++ b/kalarm/lib/spinbox.cpp
@@ -24,16 +24,16 @@
#include "spinbox.moc"
-SpinBox::SpinBox(TQWidget* parent, const char* name)
- : TQSpinBox(0, 99999, 1, parent, name),
+SpinBox::SpinBox(TQWidget* tqparent, const char* name)
+ : TQSpinBox(0, 99999, 1, tqparent, name),
mMinValue(TQSpinBox::minValue()),
mMaxValue(TQSpinBox::maxValue())
{
init();
}
-SpinBox::SpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name)
- : TQSpinBox(minValue, maxValue, step, parent, name),
+SpinBox::SpinBox(int minValue, int maxValue, int step, TQWidget* tqparent, const char* name)
+ : TQSpinBox(minValue, maxValue, step, tqparent, name),
mMinValue(minValue),
mMaxValue(maxValue)
{
@@ -212,18 +212,18 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
// Up and down arrow keys step the value
TQKeyEvent* ke = (TQKeyEvent*)e;
int key = ke->key();
- if (key == Qt::Key_Up)
+ if (key == TQt::Key_Up)
step = 1;
- else if (key == Qt::Key_Down)
+ else if (key == TQt::Key_Down)
step = -1;
- shift = ((ke->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton);
+ shift = ((ke->state() & (TQt::ShiftButton | TQt::AltButton)) == TQt::ShiftButton);
break;
}
case TQEvent::Wheel:
{
TQWheelEvent* we = (TQWheelEvent*)e;
step = (we->delta() > 0) ? 1 : -1;
- shift = ((we->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton);
+ shift = ((we->state() & (TQt::ShiftButton | TQt::AltButton)) == TQt::ShiftButton);
break;
}
#if KDE_IS_VERSION(3,1,90)
@@ -263,7 +263,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
case TQEvent::MouseButtonDblClick:
{
TQMouseEvent* me = (TQMouseEvent*)e;
- if (me->button() == Qt::LeftButton)
+ if (me->button() == TQt::LeftButton)
{
// It's a left button press. Set normal or shift stepping as appropriate.
if (mReadOnly)
@@ -271,7 +271,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
mCurrentButton = whichButton(me->pos());
if (mCurrentButton == NO_BUTTON)
return true;
- bool shift = (me->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton;
+ bool shift = (me->state() & (TQt::ShiftButton | TQt::AltButton)) == TQt::ShiftButton;
if (setShiftStepping(shift, mCurrentButton))
return true; // hide the event from the spin widget
return false; // forward event to the destination widget
@@ -281,7 +281,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
case TQEvent::MouseButtonRelease:
{
TQMouseEvent* me = (TQMouseEvent*)e;
- if (me->button() == Qt::LeftButton && mShiftMouse)
+ if (me->button() == TQt::LeftButton && mShiftMouse)
{
setShiftStepping(false, mCurrentButton); // cancel shift stepping
return false; // forward event to the destination widget
@@ -291,7 +291,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
case TQEvent::MouseMove:
{
TQMouseEvent* me = (TQMouseEvent*)e;
- if (me->state() & Qt::LeftButton)
+ if (me->state() & TQt::LeftButton)
{
// The left button is down. Track which spin button it's in.
if (mReadOnly)
@@ -302,7 +302,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
// The mouse has moved to a new spin button.
// Set normal or shift stepping as appropriate.
mCurrentButton = newButton;
- bool shift = (me->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton;
+ bool shift = (me->state() & (TQt::ShiftButton | TQt::AltButton)) == TQt::ShiftButton;
if (setShiftStepping(shift, mCurrentButton))
return true; // hide the event from the spin widget
}
@@ -313,7 +313,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
case TQEvent::Wheel:
{
TQWheelEvent* we = (TQWheelEvent*)e;
- bool shift = (we->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton;
+ bool shift = (we->state() & (TQt::ShiftButton | TQt::AltButton)) == TQt::ShiftButton;
if (setShiftStepping(shift, (we->delta() > 0 ? UP : DOWN)))
return true; // hide the event from the spin widget
return false; // forward event to the destination widget
@@ -325,14 +325,14 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
TQKeyEvent* ke = (TQKeyEvent*)e;
int key = ke->key();
int state = ke->state();
- if ((state & Qt::LeftButton)
- && (key == Qt::Key_Shift || key == Qt::Key_Alt))
+ if ((state & TQt::LeftButton)
+ && (key == TQt::Key_Shift || key == TQt::Key_Alt))
{
// The left mouse button is down, and the Shift or Alt key has changed
if (mReadOnly)
return true; // discard the event
- state ^= (key == Qt::Key_Shift) ? Qt::ShiftButton : Qt::AltButton; // new state
- bool shift = (state & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton;
+ state ^= (key == TQt::Key_Shift) ? TQt::ShiftButton : TQt::AltButton; // new state
+ bool shift = (state & (TQt::ShiftButton | TQt::AltButton)) == TQt::ShiftButton;
if ((!shift && mShiftMouse) || (shift && !mShiftMouse))
{
// The effective shift state has changed.
diff --git a/kalarm/lib/spinbox.h b/kalarm/lib/spinbox.h
index cf74e9deb..4b269d6a5 100644
--- a/kalarm/lib/spinbox.h
+++ b/kalarm/lib/spinbox.h
@@ -39,23 +39,24 @@
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class SpinBox : public QSpinBox
+class SpinBox : public TQSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit SpinBox(TQWidget* parent = 0, const char* name = 0);
+ explicit SpinBox(TQWidget* tqparent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
* @param step The (unshifted) step interval.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- SpinBox(int minValue, int maxValue, int step = 1, TQWidget* parent = 0, const char* name = 0);
+ SpinBox(int minValue, int maxValue, int step = 1, TQWidget* tqparent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the spin box can be changed by the user.
diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp
index 8b3faa706..8627838b6 100644
--- a/kalarm/lib/spinbox2.cpp
+++ b/kalarm/lib/spinbox2.cpp
@@ -1,5 +1,5 @@
/*
- * spinbox2.cpp - spin box with extra pair of spin buttons (for Qt 3)
+ * spinbox2.cpp - spin box with extra pair of spin buttons (for TQt 3)
* Program: kalarm
* Copyright © 2001-2005,2008 by David Jarvie <djarvie@kde.org>
*
@@ -48,8 +48,8 @@ static bool mirrorStyle(const TQStyle&);
int SpinBox2::mReverseLayout = -1;
-SpinBox2::SpinBox2(TQWidget* parent, const char* name)
- : TQFrame(parent, name),
+SpinBox2::SpinBox2(TQWidget* tqparent, const char* name)
+ : TQFrame(tqparent, name),
mReverseWithLayout(true)
{
mUpdown2Frame = new TQFrame(this);
@@ -60,8 +60,8 @@ SpinBox2::SpinBox2(TQWidget* parent, const char* name)
init();
}
-SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, TQWidget* parent, const char* name)
- : TQFrame(parent, name),
+SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, TQWidget* tqparent, const char* name)
+ : TQFrame(tqparent, name),
mReverseWithLayout(true)
{
mUpdown2Frame = new TQFrame(this);
@@ -371,7 +371,7 @@ int SpinBox2::MainSpinBox::shiftStepAdjustment(int oldValue, int shiftStep)
/******************************************************************************
* Repaint the widget.
-* If it's the first time since a style change, tell the parent SpinBox2 to
+* If it's the first time since a style change, tell the tqparent SpinBox2 to
* update the SpinMirror with the new unpressed button image. We make the
* presumably reasonable assumption that when a style change occurs, the spin
* buttons are unpressed.
@@ -391,8 +391,8 @@ void ExtraSpinBox::paintEvent(TQPaintEvent* e)
= Class SpinMirror
=============================================================================*/
-SpinMirror::SpinMirror(SpinBox* spinbox, TQFrame* spinFrame, TQWidget* parent, const char* name)
- : TQCanvasView(new TQCanvas, parent, name),
+SpinMirror::SpinMirror(SpinBox* spinbox, TQFrame* spinFrame, TQWidget* tqparent, const char* name)
+ : TQCanvasView(new TQCanvas, tqparent, name),
mSpinbox(spinbox),
mSpinFrame(spinFrame),
mReadOnly(false)
diff --git a/kalarm/lib/spinbox2.h b/kalarm/lib/spinbox2.h
index b1d2927d4..f83db252a 100644
--- a/kalarm/lib/spinbox2.h
+++ b/kalarm/lib/spinbox2.h
@@ -1,5 +1,5 @@
/*
- * spinbox2.h - spin box with extra pair of spin buttons (for Qt 3)
+ * spinbox2.h - spin box with extra pair of spin buttons (for TQt 3)
* Program: kalarm
* Copyright © 2001-2007 by David Jarvie <software@astrojar.org.uk>
*
@@ -53,25 +53,26 @@ class ExtraSpinBox;
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class SpinBox2 : public QFrame
+class SpinBox2 : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit SpinBox2(TQWidget* parent = 0, const char* name = 0);
+ explicit SpinBox2(TQWidget* tqparent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
* @param step The (unshifted) step interval for the right-hand spin buttons.
* @param step2 The (unshifted) step interval for the left-hand spin buttons.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
SpinBox2(int minValue, int maxValue, int step = 1, int step2 = 1,
- TQWidget* parent = 0, const char* name = 0);
+ TQWidget* tqparent = 0, const char* name = 0);
/** Sets whether the spin box can be changed by the user.
* @param readOnly True to set the widget read-only, false to set it read-write.
*/
@@ -281,10 +282,10 @@ class SpinBox2 : public QFrame
class MainSpinBox : public SpinBox
{
public:
- MainSpinBox(SpinBox2* sb2, TQWidget* parent, const char* name = 0)
- : SpinBox(parent, name), owner(sb2) { }
- MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, TQWidget* parent, const char* name = 0)
- : SpinBox(minValue, maxValue, step, parent, name), owner(sb2) { }
+ MainSpinBox(SpinBox2* sb2, TQWidget* tqparent, const char* name = 0)
+ : SpinBox(tqparent, name), owner(sb2) { }
+ MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, TQWidget* tqparent, const char* name = 0)
+ : SpinBox(minValue, maxValue, step, tqparent, name), owner(sb2) { }
void tqsetAlignment(int a) { editor()->tqsetAlignment(a); }
virtual TQString mapValueToText(int v) { return owner->mapValueToText(v); }
virtual int mapTextToValue(bool* ok) { return owner->mapTextToValue(ok); }
@@ -298,8 +299,8 @@ class SpinBox2 : public QFrame
enum { NO_BUTTON = -1, UP, DOWN, UP2, DOWN2 };
static int mReverseLayout; // widgets are mirrored right to left
- TQFrame* mUpdown2Frame; // tqcontains visible part of the extra pair of spin buttons
- TQFrame* mSpinboxFrame; // tqcontains the main spin box
+ TQFrame* mUpdown2Frame; // contains visible part of the extra pair of spin buttons
+ TQFrame* mSpinboxFrame; // contains the main spin box
ExtraSpinBox* mUpdown2; // the extra pair of spin buttons
MainSpinBox* mSpinbox; // the visible spin box
SpinMirror* mSpinMirror; // image of the extra pair of spin buttons
diff --git a/kalarm/lib/spinbox2private.h b/kalarm/lib/spinbox2private.h
index d25579f9d..ec7d2d16f 100644
--- a/kalarm/lib/spinbox2private.h
+++ b/kalarm/lib/spinbox2private.h
@@ -1,5 +1,5 @@
/*
- * spinbox2private.h - private classes for SpinBox2 (for Qt 3)
+ * spinbox2private.h - private classes for SpinBox2 (for TQt 3)
* Program: kalarm
* Copyright © 2005,2006,2008 by David Jarvie <djarvie@kde.org>
*
@@ -34,11 +34,12 @@
class ExtraSpinBox : public SpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- explicit ExtraSpinBox(TQWidget* parent, const char* name = 0)
- : SpinBox(parent, name), mNewStylePending(false) { }
- ExtraSpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name = 0)
- : SpinBox(minValue, maxValue, step, parent, name), mNewStylePending(false) { }
+ explicit ExtraSpinBox(TQWidget* tqparent, const char* name = 0)
+ : SpinBox(tqparent, name), mNewStylePending(false) { }
+ ExtraSpinBox(int minValue, int maxValue, int step, TQWidget* tqparent, const char* name = 0)
+ : SpinBox(minValue, maxValue, step, tqparent, name), mNewStylePending(false) { }
signals:
void styleUpdated();
protected:
@@ -57,11 +58,12 @@ class ExtraSpinBox : public SpinBox
* Mirroring in this way allows styles with rounded corners to display correctly.
=============================================================================*/
-class SpinMirror : public QCanvasView
+class SpinMirror : public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- explicit SpinMirror(SpinBox*, TQFrame* spinFrame, TQWidget* parent = 0, const char* name = 0);
+ explicit SpinMirror(SpinBox*, TQFrame* spinFrame, TQWidget* tqparent = 0, const char* name = 0);
void setReadOnly(bool ro) { mReadOnly = ro; }
bool isReadOnly() const { return mReadOnly; }
void setNormalButtons(const TQPixmap&);
diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp
index caed93d7b..7be3c17c2 100644
--- a/kalarm/lib/synchtimer.cpp
+++ b/kalarm/lib/synchtimer.cpp
@@ -46,7 +46,7 @@ SynchTimer::~SynchTimer()
void SynchTimer::connecT(TQObject* receiver, const char* member)
{
Connection connection(receiver, member);
- if (mConnections.find(connection) != mConnections.end())
+ if (mConnections.tqfind(connection) != mConnections.end())
return; // the slot is already connected, so ignore request
connect(mTimer, TQT_SIGNAL(timeout()), receiver, member);
mConnections.append(connection);
diff --git a/kalarm/lib/synchtimer.h b/kalarm/lib/synchtimer.h
index bbb3ae833..144c8a830 100644
--- a/kalarm/lib/synchtimer.h
+++ b/kalarm/lib/synchtimer.h
@@ -34,9 +34,10 @@ class TQTimer;
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class SynchTimer : public QObject
+class SynchTimer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~SynchTimer();
@@ -76,6 +77,7 @@ class SynchTimer : public QObject
class MinuteTimer : public SynchTimer
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~MinuteTimer() { mInstance = 0; }
/** Connect to the timer signal.
@@ -115,6 +117,7 @@ class MinuteTimer : public SynchTimer
class DailyTimer : public SynchTimer
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~DailyTimer();
/** Connect to the timer signal which triggers at the given fixed time of day.
diff --git a/kalarm/lib/timeedit.cpp b/kalarm/lib/timeedit.cpp
index 170914922..923bef8b3 100644
--- a/kalarm/lib/timeedit.cpp
+++ b/kalarm/lib/timeedit.cpp
@@ -28,8 +28,8 @@
#include "timeedit.moc"
-TimeEdit::TimeEdit(TQWidget* parent, const char* name)
- : TQHBox(parent, name),
+TimeEdit::TimeEdit(TQWidget* tqparent, const char* name)
+ : TQHBox(tqparent, name),
mAmPm(0),
mAmIndex(-1),
mPmIndex(-1),
diff --git a/kalarm/lib/timeedit.h b/kalarm/lib/timeedit.h
index 45c0abd8e..7be73c1f9 100644
--- a/kalarm/lib/timeedit.h
+++ b/kalarm/lib/timeedit.h
@@ -47,15 +47,16 @@ class TimeSpinBox;
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class TimeEdit : public QHBox
+class TimeEdit : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit TimeEdit(TQWidget* parent = 0, const char* name = 0);
+ explicit TimeEdit(TQWidget* tqparent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget is read-only for the user. If read-only,
@@ -64,7 +65,7 @@ class TimeEdit : public QHBox
* @param readOnly True to set the widget read-only, false to set it read-write.
*/
virtual void setReadOnly(bool readOnly);
- /** Returns true if the widget tqcontains a valid value. */
+ /** Returns true if the widget contains a valid value. */
bool isValid() const;
/** Sets whether the edit value is valid.
* If newly invalid, the value is displayed as asterisks.
diff --git a/kalarm/lib/timeperiod.cpp b/kalarm/lib/timeperiod.cpp
index 291ba0872..9b41e40d4 100644
--- a/kalarm/lib/timeperiod.cpp
+++ b/kalarm/lib/timeperiod.cpp
@@ -50,8 +50,8 @@ static const int maxMinutes = 1000*60-1; // absolute maximum value for hours:m
= Contains a time unit combo box, plus a time spinbox, to select a time period.
=============================================================================*/
-TimePeriod::TimePeriod(bool allowHourMinute, TQWidget* parent, const char* name)
- : TQHBox(parent, name),
+TimePeriod::TimePeriod(bool allowHourMinute, TQWidget* tqparent, const char* name)
+ : TQHBox(tqparent, name),
mMaxDays(9999),
mNoHourMinute(!allowHourMinute),
mReadOnly(false)
diff --git a/kalarm/lib/timeperiod.h b/kalarm/lib/timeperiod.h
index f6f6304fb..86b663798 100644
--- a/kalarm/lib/timeperiod.h
+++ b/kalarm/lib/timeperiod.h
@@ -47,9 +47,10 @@ class TimeSpinBox;
*
* @author David Jarvie <software@astrojar.org.uk>
*/
-class TimePeriod : public QHBox
+class TimePeriod : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Units for the time period.
* @li MINUTES - the time period is entered as a number of minutes.
@@ -64,10 +65,10 @@ class TimePeriod : public QHBox
* being allowed as units; only days and weeks can ever be used,
* regardless of other method calls. Set true to allow minutes,
* hours/minutes, days or weeks as units.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- TimePeriod(bool allowMinute, TQWidget* parent, const char* name = 0);
+ TimePeriod(bool allowMinute, TQWidget* tqparent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget is read-only for the user. If read-only,
@@ -103,7 +104,7 @@ class TimePeriod : public QHBox
/** Sets separate WhatsThis texts for the count spin boxes and the units combo box.
* If @p hourMin is omitted, both spin boxes are set to the same WhatsThis text.
*/
- void setWhatsThis(const TQString& units, const TQString& dayWeek, const TQString& hourMin = TQString::null);
+ void setWhatsThis(const TQString& units, const TQString& dayWeek, const TQString& hourMin = TQString());
static TQString i18n_minutes(); // text of 'minutes' units, lower case
static TQString i18n_Minutes(); // text of 'Minutes' units, initial capitals
diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp
index ea10cb1aa..f8700a505 100644
--- a/kalarm/lib/timespinbox.cpp
+++ b/kalarm/lib/timespinbox.cpp
@@ -27,11 +27,11 @@
#include "timespinbox.moc"
-class TimeSpinBox::TimeValidator : public QValidator
+class TimeSpinBox::TimeValidator : public TQValidator
{
public:
- TimeValidator(int minMin, int maxMin, TQWidget* parent, const char* name = 0)
- : TQValidator(parent, name),
+ TimeValidator(int minMin, int maxMin, TQWidget* tqparent, const char* name = 0)
+ : TQValidator(tqparent, name),
minMinute(minMin), maxMinute(maxMin), m12Hour(false), mPm(false) { }
virtual State validate(TQString&, int&) const;
int minMinute, maxMinute;
@@ -54,8 +54,8 @@ class TimeSpinBox::TimeValidator : public QValidator
/******************************************************************************
* Construct a wrapping 00:00 - 23:59, or 12:00 - 11:59 time spin box.
*/
-TimeSpinBox::TimeSpinBox(bool use24hour, TQWidget* parent, const char* name)
- : SpinBox2(0, 1439, 1, 60, parent, name),
+TimeSpinBox::TimeSpinBox(bool use24hour, TQWidget* tqparent, const char* name)
+ : SpinBox2(0, 1439, 1, 60, tqparent, name),
mMinimumValue(0),
m12Hour(!use24hour),
mPm(false),
@@ -69,15 +69,15 @@ TimeSpinBox::TimeSpinBox(bool use24hour, TQWidget* parent, const char* name)
setReverseWithLayout(false); // keep buttons the same way round even if right-to-left language
setShiftSteps(5, 360); // shift-left button increments 5 min / 6 hours
setSelectOnStep(false);
- tqsetAlignment(Qt::AlignHCenter);
+ tqsetAlignment(TQt::AlignHCenter);
connect(this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
}
/******************************************************************************
* Construct a non-wrapping time spin box.
*/
-TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent, const char* name)
- : SpinBox2(minMinute, maxMinute, 1, 60, parent, name),
+TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, TQWidget* tqparent, const char* name)
+ : SpinBox2(minMinute, maxMinute, 1, 60, tqparent, name),
mMinimumValue(minMinute),
m12Hour(false),
mInvalid(false),
@@ -88,7 +88,7 @@ TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent, const c
setReverseWithLayout(false); // keep buttons the same way round even if right-to-left language
setShiftSteps(5, 300); // shift-left button increments 5 min / 5 hours
setSelectOnStep(false);
- tqsetAlignment(TQApplication::reverseLayout() ? Qt::AlignLeft : Qt::AlignRight);
+ tqsetAlignment(TQApplication::reverseLayout() ? TQt::AlignLeft : TQt::AlignRight);
}
TQString TimeSpinBox::shiftWhatsThis()
@@ -124,7 +124,7 @@ TQString TimeSpinBox::mapValueToText(int v)
int TimeSpinBox::mapTextToValue(bool* ok)
{
TQString text = cleanText();
- int colon = text.find(':');
+ int colon = text.tqfind(':');
if (colon >= 0)
{
// [h]:m format for any time value
@@ -309,7 +309,7 @@ TQValidator::State TimeSpinBox::TimeValidator::validate(TQString& text, int& /*c
bool ok;
int hr = 0;
int mn = 0;
- int colon = cleanText.find(':');
+ int colon = cleanText.tqfind(':');
if (colon >= 0)
{
TQString minute = cleanText.mid(colon + 1);
diff --git a/kalarm/lib/timespinbox.h b/kalarm/lib/timespinbox.h
index 901c97e2e..4bacd4947 100644
--- a/kalarm/lib/timespinbox.h
+++ b/kalarm/lib/timespinbox.h
@@ -45,21 +45,22 @@
class TimeSpinBox : public SpinBox2
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor for a wrapping time spin box which can be used to enter a time of day.
* @param use24hour True for entry of 24-hour clock times (range 00:00 to 23:59).
* False for entry of 12-hour clock times (range 12:00 to 11:59).
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- explicit TimeSpinBox(bool use24hour, TQWidget* parent = 0, const char* name = 0);
+ explicit TimeSpinBox(bool use24hour, TQWidget* tqparent = 0, const char* name = 0);
/** Constructor for a non-wrapping time spin box which can be used to enter a length of time.
* @param minMinute The minimum value which the spin box can hold, in minutes.
* @param maxMinute The maximum value which the spin box can hold, in minutes.
- * @param parent The parent object of this widget.
+ * @param tqparent The tqparent object of this widget.
* @param name The name of this widget.
*/
- TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent = 0, const char* name = 0);
+ TimeSpinBox(int minMinute, int maxMinute, TQWidget* tqparent = 0, const char* name = 0);
/** Returns true if the spin box holds a valid value.
* An invalid value is displayed as asterisks.
*/