diff options
Diffstat (limited to 'src/__TODO')
-rwxr-xr-x | src/__TODO/AboutDialog.ui | 131 | ||||
-rw-r--r-- | src/__TODO/AboutDialogGraphicsView.cpp | 220 | ||||
-rw-r--r-- | src/__TODO/AboutDialogGraphicsView.h | 57 |
3 files changed, 0 insertions, 408 deletions
diff --git a/src/__TODO/AboutDialog.ui b/src/__TODO/AboutDialog.ui deleted file mode 100755 index 3415427..0000000 --- a/src/__TODO/AboutDialog.ui +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>AboutDialog</class> - <widget class="TQDialog" name="AboutDialog"> - <property name="windowIcon"> - <iconset resource="../resources/Icons.qrc"> - <normaloff>:/mainWindow/info.png</normaloff>:/mainWindow/info.png</iconset> - </property> - <layout class="TQVBoxLayout"> - <item> - <widget class="TQFrame" name="frame"> - <property name="styleSheet"> - <string notr="true">TQFrame#frame { background-color: qlineargradient( x1:0, y1:0, x2:0, y2:1, stop:0 #FFFF60, stop:0.5 #D8C304, stop:1 #FFFF60 ); border: 2px solid #A89C57; border-radius: 4px;}</string> - </property> - <layout class="TQVBoxLayout"> - <item> - <widget class="TQLabel" name="bannerLabel"> - <property name="pixmap"> - <pixmap resource="../resources/Icons.qrc">:/aboutDialog/banner.png</pixmap> - </property> - </widget> - </item> - <item> - <widget class="TQTextBrowser" name="versionTextBrowser"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>25</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">TQTextBrowser{background-color:transparent}</string> - </property> - <property name="frameShape"> - <enum>TQFrame::NoFrame</enum> - </property> - <property name="verticalScrollBarPolicy"> - <enum>TQt::ScrollBarAlwaysOff</enum> - </property> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'sans-serif'; font-size:large;">Version %1 rev.%2, %3</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="TQTextBrowser" name="authorTextBrowser"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="acceptDrops"> - <bool>false</bool> - </property> - <property name="styleSheet"> - <string notr="true">TQTextBrowser{background-color:transparent}</string> - </property> - <property name="frameShape"> - <enum>TQFrame::NoFrame</enum> - </property> - <property name="verticalScrollBarPolicy"> - <enum>TQt::ScrollBarAlwaysOff</enum> - </property> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium;">... is a cross platform compatible GUI for several code formatter, beautifier and indenter like GreatCode, AStyle (Artistic Styler), GNU Indent, BCPP and so on. Main feature is a live preview to directly see how the selected formatting option affects the source code.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium;"><br />Written by : </span><a href="http://www.thomas-schweitzer.de"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium; text-decoration: underline; color:#0000ff;">Thomas Schweitzer</span></a></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium;">Project Homepage : </span><a href="http://universalindent.sourceforge.net"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium; text-decoration: underline; color:#0000ff;">http://universalindent.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium;">License: UniversalIndentGui is released under the GPL 2. For details read the included file LICENSE.GPL visit </span><a href="http://www.gnu.org/licenses/gpl.html"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium; text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium;">.</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Trebuchet MS,Helvetica,sans-serif'; font-size:medium;">Credits:</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="TQTextBrowser" name="creditsTextBrowser"> - <property name="styleSheet"> - <string notr="true">TQTextBrowser#creditsTextBrowser{border:2px solid rgba(0,0,0,10%); background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,0,80%), stop:0.1 rgba(0,0,0,15%), stop:0.9 rgba(0,0,0,15%), stop:1 rgba(0,0,0,80%) )}</string> - </property> - <property name="frameShape"> - <enum>TQFrame::NoFrame</enum> - </property> - <property name="verticalScrollBarPolicy"> - <enum>TQt::ScrollBarAlwaysOff</enum> - </property> - </widget> - </item> - <item> - <layout class="TQHBoxLayout"> - <item> - <spacer> - <property name="orientation"> - <enum>TQt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>131</width> - <height>31</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="TQPushButton" name="okButton"> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - <resources> - <include location="../resources/Icons.qrc"/> - </resources> -</ui> diff --git a/src/__TODO/AboutDialogGraphicsView.cpp b/src/__TODO/AboutDialogGraphicsView.cpp deleted file mode 100644 index da224d2..0000000 --- a/src/__TODO/AboutDialogGraphicsView.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2006-2012 by Thomas Schweitzer * -* thomas-schweitzer(at)arcor.de * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License version 2.0 as * -* published by the Free Software Foundation. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program in the file LICENSE.GPL; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ - -#include "AboutDialogGraphicsView.h" - -#include "AboutDialog.h" - -#include <tqtgui.h> -#include <tqdesktopwidget.h> -#include <tqdate.h> -#include <tqtimeline.h> -#include <tqsplashscreen.h> - -/* - \class AboutDialogGraphicsView - \brief A container for the real \a AboutDialog. Makes the 3D animation possible. - - The 3D animation shall suggest the user, that he is looking at his desktop, while - this animation is done. Since this is not directly possible, \a AboutDialogGraphicsView - when shown starts in frameless fullscreen mode with a screenshot of the desktop as background. -*/ - -/* - \brief The constructor initializes everything needed for the 3D animation. - */ -AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, TQWidget *parentWindow) : - TQGraphicsView(parentWindow), _aboutDialog(NULL), _graphicsProxyWidget(NULL), - _parentWindow(NULL), _timeLine(NULL), _aboutDialogAsSplashScreen(NULL) -{ - _parentWindow = parentWindow; - setWindowFlags(TQt::SplashScreen); - -#ifdef Q_OS_LINUX - TQRect availableGeometry = TQApplication::desktop()->availableGeometry(); - TQRect newGeometry = TQRect(availableGeometry.x(), - availableGeometry.y(), availableGeometry.width(), availableGeometry.height()); -#else - TQRect newGeometry = TQRect(-1, -1, - TQApplication::desktop()->rect().width() + 2, - TQApplication::desktop()->rect().height() + 2); -#endif - setGeometry(newGeometry); - - _aboutDialog = aboutDialog; - - _windowTitleBarWidth = 0; - _windowPosOffset = 0; - - TQGraphicsScene *scene = new TQGraphicsScene(this); - setSceneRect(newGeometry); - _aboutDialogAsSplashScreen = new TQSplashScreen(this); - _graphicsProxyWidget = scene->addWidget(_aboutDialogAsSplashScreen); - _graphicsProxyWidget->setWindowFlags(TQt::ToolTip); - - setScene(scene); - setRenderHint(TQPainter::Antialiasing); - - setCacheMode(TQGraphicsView::CacheBackground); - setViewportUpdateMode(TQGraphicsView::BoundingRectViewportUpdate); - - connect(_aboutDialog, TQ_SIGNAL(finished(int)), this, TQ_SLOT(hide())); - - //setWindowOpacity(0.9); - - setVerticalScrollBarPolicy(TQt::ScrollBarAlwaysOff); - setHorizontalScrollBarPolicy(TQt::ScrollBarAlwaysOff); - setStyleSheet("AboutDialogGraphicsView { border: 0px; }"); - - _timeLine = new TQTimeLine(1000, this); - _timeLine->setFrameRange(270, 0); - //_timeLine->setUpdateInterval(10); - //_timeLine->setCurveShape(TQTimeLine::EaseInCurve); - connect(_timeLine, TQ_SIGNAL(frameChanged(int)), this, TQ_SLOT(updateStep(int))); -} - -AboutDialogGraphicsView::~AboutDialogGraphicsView(void) -{ -} - -/* - \brief Grabs a screenshot of the full desktop and shows that as background. Above that background the - AboutDialog 3D animation is shown. Also grabs the content of the AboutDialog itself. - */ -void AboutDialogGraphicsView::show() -{ - // Because on X11 system the window decoration is only available after a widget has been shown - // once, - // we can detect _windowTitleBarWidth here for the first time. - _windowTitleBarWidth = _parentWindow->geometry().y() - _parentWindow->y(); - // If the _windowTitleBarWidth could not be determined, try it a second way. Even the chances are - // low to get good results. - if (_windowTitleBarWidth == 0) - { - _windowTitleBarWidth = _parentWindow->frameGeometry().height() - - _parentWindow->geometry().height(); - } -#ifdef Q_OS_LINUX - if (_windowTitleBarWidth == 0) - { - //TODO: 27 pixel is a fix value for the Ubuntu 10.4 default window theme and so just a - // workaround for that specific case. - _windowPosOffset = 27; - _windowTitleBarWidth = 27; - } -#endif - 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(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); - - TQRectF r = _graphicsProxyWidget->boundingRect(); - _graphicsProxyWidget->setTransform(TQTransform().translate( - r.width() / 2, -_windowTitleBarWidth).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(); - TQGraphicsView::show(); - - connect(_timeLine, TQ_SIGNAL(finished()), this, TQ_SLOT(showAboutDialog())); - _timeLine->setDirection(TQTimeLine::Forward); - _timeLine->start(); -} - -/* - \brief Does the next calculation/transformation step. - */ -void AboutDialogGraphicsView::updateStep(int step) -{ - TQRectF r = _graphicsProxyWidget->boundingRect(); - _graphicsProxyWidget->setTransform(TQTransform().translate( - r.width() / 2, -_windowTitleBarWidth).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(); -} - -/* - \brief Stops the 3D animation, moves the AboutDialog to the correct place and really shows it. - */ -void AboutDialogGraphicsView::showAboutDialog() -{ - //hide(); - disconnect(_timeLine, TQ_SIGNAL(finished()), this, TQ_SLOT(showAboutDialog())); - _aboutDialog->move(int(_parentWindow->geometry().x() + - (_parentWindow->geometry().width() - _graphicsProxyWidget->geometry().width()) / 2), - _parentWindow->y() + _windowTitleBarWidth - _windowPosOffset); - _aboutDialog->exec(); -} - -/* - \brief Does not directly hide the AboutDialog but instead starts the "fade out" 3D animation. - */ -void AboutDialogGraphicsView::hide() -{ - _graphicsProxyWidget->setPos(_parentWindow->geometry().x() + - (_parentWindow->geometry().width() - _graphicsProxyWidget->geometry().width()) / 2, - _parentWindow->y() + _windowTitleBarWidth - _windowPosOffset); - - TQRectF r = _graphicsProxyWidget->boundingRect(); - _graphicsProxyWidget->setTransform(TQTransform().translate( - r.width() / 2, -_windowTitleBarWidth).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(); - TQGraphicsView::show(); - - connect(_timeLine, TQ_SIGNAL(finished()), this, TQ_SLOT(hideReally())); - _timeLine->setDirection(TQTimeLine::Backward); - _timeLine->start(); -} - -/* - \brief This slot really hides this AboutDialog container. - */ -void AboutDialogGraphicsView::hideReally() -{ - disconnect(_timeLine, TQ_SIGNAL(finished()), this, TQ_SLOT(hideReally())); - TQGraphicsView::hide(); - _parentWindow->activateWindow(); -} diff --git a/src/__TODO/AboutDialogGraphicsView.h b/src/__TODO/AboutDialogGraphicsView.h deleted file mode 100644 index 1cc5d37..0000000 --- a/src/__TODO/AboutDialogGraphicsView.h +++ /dev/null @@ -1,57 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2006-2012 by Thomas Schweitzer * -* thomas-schweitzer(at)arcor.de * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License version 2.0 as * -* published by the Free Software Foundation. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program in the file LICENSE.GPL; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#ifndef ABOUTDIALOGGRAPHICSVIEW_H -#define ABOUTDIALOGGRAPHICSVIEW_H - -#include <tqgraphicsview.h> - -class AboutDialog; - -class TQTimeLine; -class TQSplashScreen; - - -class AboutDialogGraphicsView : public TQGraphicsView -{ - TQ_OBJECT - - public: - AboutDialogGraphicsView(AboutDialog *aboutDialog, TQWidget *parentWindow = NULL); - ~AboutDialogGraphicsView(void); - - public slots: - void show(); - void hide(); - - private slots: - void updateStep(int step); - void showAboutDialog(); - void hideReally(); - - private: - AboutDialog *_aboutDialog; - TQGraphicsProxyWidget *_graphicsProxyWidget; - TQWidget *_parentWindow; - TQTimeLine *_timeLine; - TQSplashScreen *_aboutDialogAsSplashScreen; - int _windowTitleBarWidth; - int _windowPosOffset; -}; - -#endif // ABOUTDIALOGGRAPHICSVIEW_H |