annotate src/AboutDialogGraphicsView.cpp @ 745:b30f03c1a40d

Changed the positioning of the about dialog background to work on Linux properly. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1022 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Mon, 27 Sep 2010 18:53:48 +0000
parents 9b37def27afe
children 850c647d857d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
1 /***************************************************************************
727
aae5a8d04f70 Updated comment copyright year.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 716
diff changeset
2 * Copyright (C) 2006-2010 by Thomas Schweitzer *
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
3 * thomas-schweitzer(at)arcor.de *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
4 * *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
5 * This program is free software; you can redistribute it and/or modify *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
6 * it under the terms of the GNU General Public License version 2.0 as *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
7 * published by the Free Software Foundation. *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
8 * *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
9 * This program is distributed in the hope that it will be useful, *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
12 * GNU General Public License for more details. *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
13 * *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
14 * You should have received a copy of the GNU General Public License *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
15 * along with this program in the file LICENSE.GPL; if not, write to the *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
16 * Free Software Foundation, Inc., *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
18 ***************************************************************************/
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
19 #include <QtGui>
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
20 #include "AboutDialogGraphicsView.h"
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
21
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
22 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
23 \class AboutDialogGraphicsView
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
24 \brief A container for the real \a AboutDialog. Makes the 3D animation possible.
634
82cd1efd6015 Talking about clean and well formatted code all the time and never run mine through a beautifier while still having a mix of tabs an spaces. So now Uncrustify has cleaned my code. Still two unsatisfying points are left. indenthandler.cpp line 467 a space between case label and colon has been removed and like on line 503 some code lines got indented without setting that explicitly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 599
diff changeset
25
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
26 The 3D animation shall suggest the user, that he is looking at his desktop, while
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
27 this animation is done. Since this is not directly possible, \a AboutDialogGraphicsView
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
28 when shown starts in frameless fullscreen mode with a screenshot of the desktop as background.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
29 */
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
30
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
31 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
32 \brief The constructor initializes everything needed for the 3D animation.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
33 */
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
34 AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parent) : QGraphicsView(parent) {
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
35 this->parent = parent;
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
36 setWindowFlags(Qt::SplashScreen);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
37
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
38 #ifdef Q_OS_LINUX
745
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
39 QRect availableGeometry = QApplication::desktop()->availableGeometry();
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
40 QRect newGeometry = QRect( availableGeometry.x(), availableGeometry.y(), availableGeometry.width(), availableGeometry.height() );
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
41 windowPosOffset = 27;
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
42 #else
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
43 QRect newGeometry = QRect( -1,-1, QApplication::desktop()->rect().width()+2, QApplication::desktop()->rect().height()+2 );
745
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
44 windowPosOffset = 0;
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
45 #endif
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
46 setGeometry( newGeometry );
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
47
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
48 this->aboutDialog = aboutDialog;
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
49
716
b9123ff53106 Run cppcheck over the code and removed some possible problems.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 648
diff changeset
50 windowTitleBarWidth = 0;
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
51
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
52 scene = new QGraphicsScene(this);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
53 setSceneRect( newGeometry );
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
54 aboutDialogAsSplashScreen = new QSplashScreen(this);
737
9b37def27afe Updated the AboutDialogGraphicsView to show correctly on Mac and set the window focus back to the main window after closing the dialog.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 727
diff changeset
55 //aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
56 graphicsProxyWidget = scene->addWidget(aboutDialogAsSplashScreen);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
57 graphicsProxyWidget->setWindowFlags( Qt::ToolTip );
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
58
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
59 setScene( scene );
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
60 setRenderHint(QPainter::Antialiasing);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
61
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
62 setCacheMode(QGraphicsView::CacheBackground);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
63 setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
64
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
65 connect(aboutDialog, SIGNAL(finished(int)), this, SLOT(hide()));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
66
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
67 //setWindowOpacity(0.9);
634
82cd1efd6015 Talking about clean and well formatted code all the time and never run mine through a beautifier while still having a mix of tabs an spaces. So now Uncrustify has cleaned my code. Still two unsatisfying points are left. indenthandler.cpp line 467 a space between case label and colon has been removed and like on line 503 some code lines got indented without setting that explicitly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 599
diff changeset
68
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
69 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
70 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
71 setStyleSheet("AboutDialogGraphicsView { border: 0px; }");
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
72
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
73 timeLine = new QTimeLine(1000, this);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
74 timeLine->setFrameRange(270, 0);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
75 //timeLine->setUpdateInterval(10);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
76 //timeLine->setCurveShape(QTimeLine::EaseInCurve);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
77 connect(timeLine, SIGNAL(frameChanged(int)), this, SLOT(updateStep(int)));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
78 }
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
79
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
80
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
81 AboutDialogGraphicsView::~AboutDialogGraphicsView(void) {
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
82 }
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
83
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
84
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
85 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
86 \brief Grabs a screenshot of the full desktop and shows that as background. Above that background the
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
87 AboutDialog 3D animation is shown. Also grabs the content of the AboutDialog itself.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
88 */
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
89 void AboutDialogGraphicsView::show() {
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
90 // Because on X11 system the window decoration is only available after a widget has been shown once,
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
91 // we can detect windowTitleBarWidth here for the first time.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
92 windowTitleBarWidth = parent->geometry().y() - parent->y();
745
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
93 QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId(), QApplication::desktop()->availableGeometry().x(), QApplication::desktop()->availableGeometry().y(), geometry().width(), geometry().height() );
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
94 QBrush brush(originalPixmap);
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
95 QTransform transform;
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
96 transform.translate(0, QApplication::desktop()->availableGeometry().y());
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
97 brush.setTransform(transform);
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
98
745
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
99 setBackgroundBrush(brush);
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
100
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
101 aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
102 graphicsProxyWidget->setGeometry( aboutDialog->geometry() );
737
9b37def27afe Updated the AboutDialogGraphicsView to show correctly on Mac and set the window focus back to the main window after closing the dialog.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 727
diff changeset
103 aboutDialog->hide();
745
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
104 graphicsProxyWidget->setPos( parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2, parent->y()+windowTitleBarWidth-windowPosOffset);
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
105
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
106 QRectF r = graphicsProxyWidget->boundingRect();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
107 graphicsProxyWidget->setTransform(QTransform()
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
108 .translate(r.width() / 2, -windowTitleBarWidth)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
109 .rotate(270, Qt::XAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
110 //.rotate(90, Qt::YAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
111 //.rotate(5, Qt::ZAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
112 //.scale(1 + 1.5 * step, 1 + 1.5 * step)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
113 .translate(-r.width() / 2, windowTitleBarWidth));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
114
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
115 graphicsProxyWidget->show();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
116 //aboutDialogAsSplashScreen->show();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
117 QGraphicsView::show();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
118
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
119 connect(timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog()));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
120 timeLine->setDirection(QTimeLine::Forward);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
121 timeLine->start();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
122 }
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
123
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
124
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
125 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
126 \brief Does the next calculation/transformation step.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
127 */
635
e1fdfb9adf92 According to the previous code formatting also made the function opening brace be consistently placed.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 634
diff changeset
128 void AboutDialogGraphicsView::updateStep(int step) {
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
129 QRectF r = graphicsProxyWidget->boundingRect();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
130 graphicsProxyWidget->setTransform(QTransform()
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
131 .translate(r.width() / 2, -windowTitleBarWidth)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
132 .rotate(step, Qt::XAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
133 //.rotate(step, Qt::YAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
134 //.rotate(step * 5, Qt::ZAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
135 //.scale(1 + 1.5 * step, 1 + 1.5 * step)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
136 .translate(-r.width() / 2, windowTitleBarWidth));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
137 //update();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
138 }
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
139
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
140
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
141 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
142 \brief Stops the 3D animation, moves the AboutDialog to the correct place and really shows it.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
143 */
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
144 void AboutDialogGraphicsView::showAboutDialog() {
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
145 //hide();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
146 disconnect(timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog()));
745
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
147 aboutDialog->move( int(parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2), parent->y()+windowTitleBarWidth-windowPosOffset );
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
148 aboutDialog->exec();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
149 }
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
150
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
151
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
152 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
153 \brief Does not directly hide the AboutDialog but instead starts the "fade out" 3D animation.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
154 */
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
155 void AboutDialogGraphicsView::hide() {
737
9b37def27afe Updated the AboutDialogGraphicsView to show correctly on Mac and set the window focus back to the main window after closing the dialog.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 727
diff changeset
156 //aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
9b37def27afe Updated the AboutDialogGraphicsView to show correctly on Mac and set the window focus back to the main window after closing the dialog.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 727
diff changeset
157 //graphicsProxyWidget->setGeometry( aboutDialog->geometry() );
745
b30f03c1a40d Changed the positioning of the about dialog background to work on Linux properly.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 737
diff changeset
158 graphicsProxyWidget->setPos( parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2, parent->y()+windowTitleBarWidth-windowPosOffset);
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
159
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
160 QRectF r = graphicsProxyWidget->boundingRect();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
161 graphicsProxyWidget->setTransform(QTransform()
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
162 .translate(r.width() / 2, -windowTitleBarWidth)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
163 .rotate(0, Qt::XAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
164 //.rotate(90, Qt::YAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
165 //.rotate(5, Qt::ZAxis)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
166 //.scale(1 + 1.5 * step, 1 + 1.5 * step)
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
167 .translate(-r.width() / 2, windowTitleBarWidth));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
168
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
169 graphicsProxyWidget->show();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
170 //aboutDialogAsSplashScreen->show();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
171 QGraphicsView::show();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
172
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
173 connect(timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
174 timeLine->setDirection(QTimeLine::Backward);
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
175 timeLine->start();
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
176 }
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
177
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
178
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
179 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
180 \brief This slot really hides this AboutDialog container.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
181 */
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
182 void AboutDialogGraphicsView::hideReally() {
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
183 disconnect(timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
184 QGraphicsView::hide();
737
9b37def27afe Updated the AboutDialogGraphicsView to show correctly on Mac and set the window focus back to the main window after closing the dialog.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 727
diff changeset
185 parent->activateWindow();
556
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
186 }
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
187
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
188
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
189 /*!
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
190 \brief Makes it possible to set the screen shot used for the animation.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
191 */
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
192 //TODO: Test whether this function is really still needed. Not only for debug.
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
193 void AboutDialogGraphicsView::setScreenshotPixmap(const QPixmap &screenShot) {
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
194 originalPixmap = screenShot;
6255a3c1c66c On Linux and Mac the fullscreen AboutDialogGraphicsView had a frame. Removed that.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 542
diff changeset
195 }