summaryrefslogtreecommitdiffstats
path: root/src/gui/kwidgetlister.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/gui/kwidgetlister.h
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/kwidgetlister.h')
-rw-r--r--src/gui/kwidgetlister.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/gui/kwidgetlister.h b/src/gui/kwidgetlister.h
index e02b54c..c57f1e4 100644
--- a/src/gui/kwidgetlister.h
+++ b/src/gui/kwidgetlister.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -32,12 +32,12 @@
#ifndef _KWIDGETLISTER_H_
#define _KWIDGETLISTER_H_
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
class KPushButton;
-class QVBoxLayout;
-class QHBox;
+class TQVBoxLayout;
+class TQHBox;
/** Simple widget that nonetheless does a lot of the dirty work for
the filter edit widgets (@ref KMSearchpatternEdit and @ref
@@ -59,30 +59,31 @@ class QHBox;
*/
-class KWidgetLister : public QWidget
+class KWidgetLister : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWidgetLister( int minWidgets=1, int maxWidgets=8, QWidget* parent=0, const char* name=0 );
+ KWidgetLister( int minWidgets=1, int maxWidgets=8, TQWidget* tqparent=0, const char* name=0 );
virtual ~KWidgetLister();
protected slots:
/** Called whenever the user clicks on the 'more' button.
Reimplementations should call this method, because this
implementation does all the dirty work with adding the widgets
- to the layout (through @ref addWidgetAtEnd) and enabling/disabling
+ to the tqlayout (through @ref addWidgetAtEnd) and enabling/disabling
the control buttons. */
virtual void slotMore();
/** Called whenever the user clicks on the 'fewer' button.
Reimplementations should call this method, because this
implementation does all the dirty work with removing the widgets
- from the layout (through @ref removelastWidget) and
+ from the tqlayout (through @ref removelastWidget) and
enabling/disabling the control buttons. */
virtual void slotFewer();
/** Called whenever the user clicks on the 'clear' button.
Reimplementations should call this method, because this
implementation does all the dirty work with removing all but
- @ref mMinWidets widgets from the layout and enabling/disabling
+ @ref mMinWidets widgets from the tqlayout and enabling/disabling
the control buttons. */
virtual void slotClear();
@@ -96,8 +97,8 @@ protected:
when showing it on screen. Make sure you call this
implementaion, though, since you cannot put the widget on screen
from derived classes (@p mLayout is private).
- Make sure the parent of the QWidget to add is this KWidgetLister. */
- virtual void addWidgetAtEnd(QWidget *w =0);
+ Make sure the tqparent of the TQWidget to add is this KWidgetLister. */
+ virtual void addWidgetAtEnd(TQWidget *w =0);
/** Removes a single (always the last) widget. Doesn't care if there
are still only @ref mMinWidgets left on screen and whether it
should enable/disable any controls. It simply does what it is
@@ -108,12 +109,12 @@ protected:
virtual void removeLastWidget();
/** Called to clear a given widget. The default implementation does
nothing. */
- virtual void clearWidget( QWidget* );
+ virtual void clearWidget( TQWidget* );
/** Because QT 2.x does not support signals/slots in template
classes, we are forced to emulate this by forcing the
implementers of subclasses of KWidgetLister to reimplement this
function which replaces the "@p new @p T" call. */
- virtual QWidget* createWidget( QWidget *parent );
+ virtual TQWidget* createWidget( TQWidget *tqparent );
/** Sets the number of widgets on scrren to exactly @p aNum. Doesn't
check if @p aNum is inside the range @p
[mMinWidgets,mMaxWidgets]. */
@@ -121,7 +122,7 @@ protected:
/** The list of widgets. Note that this list is set to auto-delete,
meaning that widgets that are removed from the screen by either
@ref slotFewer or @ref slotClear will be destroyed! */
- QPtrList<QWidget> mWidgetList;
+ TQPtrList<TQWidget> mWidgetList;
/** The minimum number of widgets that are to stay on screen. */
int mMinWidgets;
/** The maximum number of widgets that are to be shown on screen. */
@@ -131,7 +132,7 @@ signals:
/** This signal is emitted whenever a widget was added */
void widgetAdded();
/** This signal is emitted whenever a widget was added */
- void widgetAdded(QWidget *);
+ void widgetAdded(TQWidget *);
/** This signal is emitted whenever a widget was removed */
void widgetRemoved();
/** This signal is emitted whenever the clear button is clicked */
@@ -141,8 +142,8 @@ private:
void enableControls();
KPushButton *mBtnMore, *mBtnFewer, *mBtnClear;
- QVBoxLayout *mLayout;
- QHBox *mButtonBox;
+ TQVBoxLayout *mLayout;
+ TQHBox *mButtonBox;
};