diff options
Diffstat (limited to 'src/AboutDialogGraphicsView.cpp')
-rwxr-xr-x | src/AboutDialogGraphicsView.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/AboutDialogGraphicsView.cpp b/src/AboutDialogGraphicsView.cpp index 52cb6e1..8c868ef 100755 --- a/src/AboutDialogGraphicsView.cpp +++ b/src/AboutDialogGraphicsView.cpp @@ -22,10 +22,10 @@ #include "AboutDialog.h" #include <tqtgui.h> -#include <tqdesktopwidget.h> +#include <tntqdesktopwidget.h> #include <tqdate.h> #include <tqtimeline.h> -#include <tqsplashscreen.h> +#include <tntqsplashscreen.h> /*! \class AboutDialogGraphicsView @@ -39,7 +39,7 @@ /*! \brief The constructor initializes everything needed for the 3D animation. */ -AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parentWindow) : QGraphicsView(parentWindow) +AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, TQWidget *parentWindow) : TQGraphicsView(parentWindow) , _aboutDialog(NULL) , _graphicsProxyWidget(NULL) , _parentWindow(NULL) @@ -47,13 +47,13 @@ AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidg , _aboutDialogAsSplashScreen(NULL) { _parentWindow = parentWindow; - setWindowFlags(Qt::SplashScreen); + setWindowFlags(TQt::SplashScreen); #ifdef Q_OS_LINUX - QRect availableGeometry = QApplication::desktop()->availableGeometry(); - QRect newGeometry = QRect( availableGeometry.x(), availableGeometry.y(), availableGeometry.width(), availableGeometry.height() ); + TQRect availableGeometry = TQApplication::desktop()->availableGeometry(); + TQRect newGeometry = TQRect( availableGeometry.x(), availableGeometry.y(), availableGeometry.width(), availableGeometry.height() ); #else - QRect newGeometry = QRect( -1,-1, QApplication::desktop()->rect().width()+2, QApplication::desktop()->rect().height()+2 ); + TQRect newGeometry = TQRect( -1,-1, TQApplication::desktop()->rect().width()+2, TQApplication::desktop()->rect().height()+2 ); #endif setGeometry( newGeometry ); @@ -62,30 +62,30 @@ AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidg _windowTitleBarWidth = 0; _windowPosOffset = 0; - QGraphicsScene *scene = new QGraphicsScene(this); + TQGraphicsScene *scene = new TQGraphicsScene(this); setSceneRect( newGeometry ); - _aboutDialogAsSplashScreen = new QSplashScreen(this); + _aboutDialogAsSplashScreen = new TQSplashScreen(this); _graphicsProxyWidget = scene->addWidget(_aboutDialogAsSplashScreen); - _graphicsProxyWidget->setWindowFlags( Qt::ToolTip ); + _graphicsProxyWidget->setWindowFlags( TQt::ToolTip ); setScene( scene ); - setRenderHint(QPainter::Antialiasing); + setRenderHint(TQPainter::Antialiasing); - setCacheMode(QGraphicsView::CacheBackground); - setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); + setCacheMode(TQGraphicsView::CacheBackground); + setViewportUpdateMode(TQGraphicsView::BoundingRectViewportUpdate); connect(_aboutDialog, SIGNAL(finished(int)), this, SLOT(hide())); //setWindowOpacity(0.9); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(TQt::ScrollBarAlwaysOff); + setHorizontalScrollBarPolicy(TQt::ScrollBarAlwaysOff); setStyleSheet("AboutDialogGraphicsView { border: 0px; }"); - _timeLine = new QTimeLine(1000, this); + _timeLine = new TQTimeLine(1000, this); _timeLine->setFrameRange(270, 0); //_timeLine->setUpdateInterval(10); - //_timeLine->setCurveShape(QTimeLine::EaseInCurve); + //_timeLine->setCurveShape(TQTimeLine::EaseInCurve); connect(_timeLine, SIGNAL(frameChanged(int)), this, SLOT(updateStep(int))); } @@ -112,34 +112,34 @@ void AboutDialogGraphicsView::show() { _windowTitleBarWidth = 27; } #endif - QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId(), QApplication::desktop()->availableGeometry().x(), QApplication::desktop()->availableGeometry().y(), geometry().width(), geometry().height() ); - QBrush brush(originalPixmap); - QTransform transform; - transform.translate(0, QApplication::desktop()->availableGeometry().y()); + TQPixmap originalPixmap = TQPixmap::grabWindow(TQApplication::desktop()->winId(), TQApplication::desktop()->availableGeometry().x(), TQApplication::desktop()->availableGeometry().y(), geometry().width(), geometry().height() ); + TQBrush brush(originalPixmap); + TQTransform transform; + transform.translate(0, TQApplication::desktop()->availableGeometry().y()); brush.setTransform(transform); setBackgroundBrush(brush); - _aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(_aboutDialog) ); + _aboutDialogAsSplashScreen->setPixmap( TQPixmap::grabWidget(_aboutDialog) ); _graphicsProxyWidget->setGeometry( _aboutDialog->geometry() ); _aboutDialog->hide(); _graphicsProxyWidget->setPos( _parentWindow->geometry().x()+(_parentWindow->geometry().width()-_graphicsProxyWidget->geometry().width()) / 2, _parentWindow->y()+_windowTitleBarWidth-_windowPosOffset); - QRectF r = _graphicsProxyWidget->boundingRect(); - _graphicsProxyWidget->setTransform(QTransform() + TQRectF r = _graphicsProxyWidget->boundingRect(); + _graphicsProxyWidget->setTransform(TQTransform() .translate(r.width() / 2, -_windowTitleBarWidth) - .rotate(270, Qt::XAxis) - //.rotate(90, Qt::YAxis) - //.rotate(5, Qt::ZAxis) + .rotate(270, TQt::XAxis) + //.rotate(90, TQt::YAxis) + //.rotate(5, TQt::ZAxis) //.scale(1 + 1.5 * step, 1 + 1.5 * step) .translate(-r.width() / 2, _windowTitleBarWidth)); _graphicsProxyWidget->show(); //_aboutDialogAsSplashScreen->show(); - QGraphicsView::show(); + TQGraphicsView::show(); connect(_timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog())); - _timeLine->setDirection(QTimeLine::Forward); + _timeLine->setDirection(TQTimeLine::Forward); _timeLine->start(); } @@ -148,12 +148,12 @@ void AboutDialogGraphicsView::show() { \brief Does the next calculation/transformation step. */ void AboutDialogGraphicsView::updateStep(int step) { - QRectF r = _graphicsProxyWidget->boundingRect(); - _graphicsProxyWidget->setTransform(QTransform() + TQRectF r = _graphicsProxyWidget->boundingRect(); + _graphicsProxyWidget->setTransform(TQTransform() .translate(r.width() / 2, -_windowTitleBarWidth) - .rotate(step, Qt::XAxis) - //.rotate(step, Qt::YAxis) - //.rotate(step * 5, Qt::ZAxis) + .rotate(step, TQt::XAxis) + //.rotate(step, TQt::YAxis) + //.rotate(step * 5, TQt::ZAxis) //.scale(1 + 1.5 * step, 1 + 1.5 * step) .translate(-r.width() / 2, _windowTitleBarWidth)); //update(); @@ -177,21 +177,21 @@ void AboutDialogGraphicsView::showAboutDialog() { void AboutDialogGraphicsView::hide() { _graphicsProxyWidget->setPos( _parentWindow->geometry().x()+(_parentWindow->geometry().width()-_graphicsProxyWidget->geometry().width()) / 2, _parentWindow->y()+_windowTitleBarWidth-_windowPosOffset); - QRectF r = _graphicsProxyWidget->boundingRect(); - _graphicsProxyWidget->setTransform(QTransform() + TQRectF r = _graphicsProxyWidget->boundingRect(); + _graphicsProxyWidget->setTransform(TQTransform() .translate(r.width() / 2, -_windowTitleBarWidth) - .rotate(0, Qt::XAxis) - //.rotate(90, Qt::YAxis) - //.rotate(5, Qt::ZAxis) + .rotate(0, TQt::XAxis) + //.rotate(90, TQt::YAxis) + //.rotate(5, TQt::ZAxis) //.scale(1 + 1.5 * step, 1 + 1.5 * step) .translate(-r.width() / 2, _windowTitleBarWidth)); _graphicsProxyWidget->show(); //_aboutDialogAsSplashScreen->show(); - QGraphicsView::show(); + TQGraphicsView::show(); connect(_timeLine, SIGNAL(finished()), this, SLOT(hideReally())); - _timeLine->setDirection(QTimeLine::Backward); + _timeLine->setDirection(TQTimeLine::Backward); _timeLine->start(); } @@ -201,6 +201,6 @@ void AboutDialogGraphicsView::hide() { */ void AboutDialogGraphicsView::hideReally() { disconnect(_timeLine, SIGNAL(finished()), this, SLOT(hideReally())); - QGraphicsView::hide(); + TQGraphicsView::hide(); _parentWindow->activateWindow(); } |