summaryrefslogtreecommitdiffstats
path: root/ksysv/kscroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksysv/kscroller.cpp')
-rw-r--r--ksysv/kscroller.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/ksysv/kscroller.cpp b/ksysv/kscroller.cpp
index 1f69b74..fc71368 100644
--- a/ksysv/kscroller.cpp
+++ b/ksysv/kscroller.cpp
@@ -1,8 +1,8 @@
// (c) 2000 Peter Putzer
-#include <qscrollbar.h>
-#include <qlayout.h>
-#include <qstyle.h>
+#include <tqscrollbar.h>
+#include <tqlayout.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -20,15 +20,15 @@ public:
~KScrollerPrivate () {}
- QWidget* setCornerWidget;
+ TQWidget* setCornerWidget;
};
-KScroller::KScroller (QWidget* parent, const char* name)
- : QFrame (parent, name),
+KScroller::KScroller (TQWidget* parent, const char* name)
+ : TQFrame (parent, name),
d (new KScrollerPrivate()),
- mVertical (new QScrollBar (QScrollBar::Vertical, this)),
- mHorizontal (new QScrollBar (QScrollBar::Horizontal, this)),
- mCornerWidget (new QWidget (this)),
+ mVertical (new TQScrollBar (TQScrollBar::Vertical, this)),
+ mHorizontal (new TQScrollBar (TQScrollBar::Horizontal, this)),
+ mCornerWidget (new TQWidget (this)),
mContent (0L),
mVerticalOld (0),
mHorizontalOld (0)
@@ -37,10 +37,10 @@ KScroller::KScroller (QWidget* parent, const char* name)
mVertical->hide();
mHorizontal->hide();
- connect (mVertical, SIGNAL (valueChanged (int)),
- this, SLOT (scrollVertical (int)));
- connect (mHorizontal, SIGNAL (valueChanged (int)),
- this, SLOT (scrollHorizontal (int)));
+ connect (mVertical, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (scrollVertical (int)));
+ connect (mHorizontal, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (scrollHorizontal (int)));
}
KScroller::~KScroller ()
@@ -48,7 +48,7 @@ KScroller::~KScroller ()
delete d;
}
-void KScroller::setContent (QWidget* content)
+void KScroller::setContent (TQWidget* content)
{
delete mContent;
@@ -56,7 +56,7 @@ void KScroller::setContent (QWidget* content)
updateScrollBars();
}
-void KScroller::setCornerWidget (QWidget* corner)
+void KScroller::setCornerWidget (TQWidget* corner)
{
delete mCornerWidget;
@@ -65,31 +65,31 @@ void KScroller::setCornerWidget (QWidget* corner)
updateScrollBars();
}
-QWidget* KScroller::cornerWidget ()
+TQWidget* KScroller::cornerWidget ()
{
return d->setCornerWidget;
}
-void KScroller::resizeEvent (QResizeEvent* e)
+void KScroller::resizeEvent (TQResizeEvent* e)
{
- QFrame::resizeEvent (e);
+ TQFrame::resizeEvent (e);
updateScrollBars();
}
-QSize KScroller::minimumSizeHint() const
+TQSize KScroller::minimumSizeHint() const
{
- QSize size = sizeHint();
+ TQSize size = sizeHint();
if (size.width() > 300)
size.setWidth(300);
return size;
}
-QSize KScroller::sizeHint() const
+TQSize KScroller::sizeHint() const
{
- QSize size = mContent->minimumSize();
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
- size += QSize( extra, extra );
+ TQSize size = mContent->minimumSize();
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
+ size += TQSize( extra, extra );
return size;
}
@@ -97,7 +97,7 @@ void KScroller::updateScrollBars ()
{
int w = width();
int h = height();
- QSize cs = mContent->minimumSize();
+ TQSize cs = mContent->minimumSize();
setupVertical ( cs.width(), cs.height(), w, h);
setupHorizontal ( cs.width(), cs.height(), w, h);
@@ -113,7 +113,7 @@ void KScroller::setupHorizontal (int cw, int, int w, int h)
if (cw > w)
{
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
if (!mVertical->isHidden())
w -= extra;
@@ -139,7 +139,7 @@ void KScroller::setupVertical (int, int ch, int w, int h)
if (ch > h)
{
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
mVertical->setRange (0, ch - h);
mVertical->setPageStep (h);
mVertical->setLineStep (25);
@@ -175,7 +175,7 @@ void KScroller::setupCornerWidget (int w, int h)
{
if (!mVertical->isHidden() && !mHorizontal->isHidden())
{
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
mCornerWidget->raise();
mCornerWidget->setGeometry (w - extra, h - extra, extra, extra);