summaryrefslogtreecommitdiffstats
path: root/src/gvcore/fullscreenbar.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
commitbf7f88413be3831a9372d323d02fc0335b9f9188 (patch)
tree516fdef9206245b40a14f99b4e3d9ef9289196e0 /src/gvcore/fullscreenbar.cpp
parente238aa77b1fb3c2f55aef2ef2c91ce52166d2cc8 (diff)
downloadgwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.tar.gz
gwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.zip
TQt4 port Gwenview
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gwenview@1233720 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gvcore/fullscreenbar.cpp')
-rw-r--r--src/gvcore/fullscreenbar.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/gvcore/fullscreenbar.cpp b/src/gvcore/fullscreenbar.cpp
index bd3b3de..46f0af8 100644
--- a/src/gvcore/fullscreenbar.cpp
+++ b/src/gvcore/fullscreenbar.cpp
@@ -18,12 +18,12 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qbitmap.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtimer.h>
+// TQt
+#include <tqbitmap.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -42,7 +42,7 @@ const int SLIDE_OUT_INTERVAL = 12;
const int SLIDE_STEP = 4;
-static void fillMask(QPainter& painter, const QRect& rect) {
+static void fillMask(TQPainter& painter, const TQRect& rect) {
painter.fillRect(
rect.left(),
rect.top(),
@@ -69,31 +69,31 @@ enum BarState { OUT, SLIDING_OUT, SLIDING_IN, IN };
struct FullScreenBar::Private {
- QTimer mTimer;
+ TQTimer mTimer;
BarState mState;
bool mFirstShow;
};
-FullScreenBar::FullScreenBar(QWidget* parent)
-: KToolBar(parent, "FullScreenBar") {
+FullScreenBar::FullScreenBar(TQWidget* tqparent)
+: KToolBar(tqparent, "FullScreenBar") {
d=new Private;
d->mState=OUT;
d->mFirstShow=true;
setIconSize(FULLSCREEN_ICON_SIZE);
setMovingEnabled(false);
- QColor bg=colorGroup().highlight();
- QColor fg=colorGroup().highlightedText();
- QPalette pal(palette());
- pal.setColor(QColorGroup::Background, bg);
- pal.setColor(QColorGroup::Foreground, fg);
- pal.setColor(QColorGroup::Button, bg);
- pal.setColor(QColorGroup::ButtonText, fg);
+ TQColor bg=tqcolorGroup().highlight();
+ TQColor fg=tqcolorGroup().highlightedText();
+ TQPalette pal(palette());
+ pal.setColor(TQColorGroup::Background, bg);
+ pal.setColor(TQColorGroup::Foreground, fg);
+ pal.setColor(TQColorGroup::Button, bg);
+ pal.setColor(TQColorGroup::ButtonText, fg);
setPalette(pal);
// Timer
- connect(&d->mTimer, SIGNAL(timeout()), this, SLOT(slotUpdateSlide()) );
+ connect(&d->mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateSlide()) );
}
@@ -102,28 +102,28 @@ FullScreenBar::~FullScreenBar() {
}
-void FullScreenBar::resizeEvent(QResizeEvent* event) {
+void FullScreenBar::resizeEvent(TQResizeEvent* event) {
KToolBar::resizeEvent(event);
- // Create a mask
- QPainter painter;
- QBitmap mask(size(), true);
- painter.begin(&mask);
- painter.setBrush(Qt::white);
+ // Create a tqmask
+ TQPainter painter;
+ TQBitmap tqmask(size(), true);
+ painter.begin(&tqmask);
+ painter.setBrush(TQt::white);
fillMask(painter, rect());
painter.end();
- setMask(mask);
+ setMask(tqmask);
}
-void FullScreenBar::showEvent(QShowEvent* event) {
+void FullScreenBar::showEvent(TQShowEvent* event) {
KToolBar::showEvent(event);
// Make sure the bar position corresponds to the OUT state
if (!d->mFirstShow) return;
d->mFirstShow=false;
move(0, -height());
- layout()->setResizeMode(QLayout::Fixed);
+ tqlayout()->setResizeMode(TQLayout::Fixed);
}