Diffstat (limited to 'library/qpedecoration_qws.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | library/qpedecoration_qws.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index 214c721..9cbe92b 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp | |||
@@ -1,68 +1,67 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifdef QWS | ||
21 | #define QTOPIA_INTERNAL_LANGLIST | 20 | #define QTOPIA_INTERNAL_LANGLIST |
22 | #include <qapplication.h> | 21 | #include <qapplication.h> |
23 | #include <qstyle.h> | 22 | #include <qstyle.h> |
24 | #include <qwidget.h> | 23 | #include <qwidget.h> |
25 | #include <qpainter.h> | 24 | #include <qpainter.h> |
26 | #include <qtimer.h> | 25 | #include <qtimer.h> |
27 | #include <qwhatsthis.h> | 26 | #include <qwhatsthis.h> |
28 | #include "qcopenvelope_qws.h" | 27 | #include "qcopenvelope_qws.h" |
29 | #include "qpedecoration_qws.h" | 28 | #include "qpedecoration_qws.h" |
30 | #include <qdialog.h> | 29 | #include <qdialog.h> |
31 | #include <qdrawutil.h> | 30 | #include <qdrawutil.h> |
32 | #include <qgfx_qws.h> | 31 | #include <qgfx_qws.h> |
33 | #include "qpeapplication.h" | 32 | #include "qpeapplication.h" |
34 | #include "resource.h" | 33 | #include "resource.h" |
35 | #include "global.h" | 34 | #include "global.h" |
36 | #include "qlibrary.h" | 35 | #include "qlibrary.h" |
37 | #include "windowdecorationinterface.h" | 36 | #include "windowdecorationinterface.h" |
38 | #include <qfile.h> | 37 | #include <qfile.h> |
39 | #include <qsignal.h> | 38 | #include <qsignal.h> |
40 | 39 | ||
41 | #include <stdlib.h> | 40 | #include <stdlib.h> |
42 | 41 | ||
43 | extern QRect qt_maxWindowRect; | 42 | extern QRect qt_maxWindowRect; |
44 | 43 | ||
45 | #define WHATSTHIS_MODE | 44 | #define WHATSTHIS_MODE |
46 | 45 | ||
47 | #ifndef QT_NO_QWS_QPE_WM_STYLE | 46 | #ifndef QT_NO_QWS_QPE_WM_STYLE |
48 | 47 | ||
49 | #ifndef QT_NO_IMAGEIO_XPM | 48 | #ifndef QT_NO_IMAGEIO_XPM |
50 | 49 | ||
51 | /* XPM */ | 50 | /* XPM */ |
52 | static const char * const qpe_close_xpm[] = { | 51 | static const char * const qpe_close_xpm[] = { |
53 | "16 16 3 1", | 52 | "16 16 3 1", |
54 | " c None", | 53 | " c None", |
55 | ". c #FFFFFF", | 54 | ". c #FFFFFF", |
56 | "+ c #000000", | 55 | "+ c #000000", |
57 | " ", | 56 | " ", |
58 | " ", | 57 | " ", |
59 | " ..... ", | 58 | " ..... ", |
60 | " ..+++++.. ", | 59 | " ..+++++.. ", |
61 | " .+++++++++. ", | 60 | " .+++++++++. ", |
62 | " .+..+++..+. ", | 61 | " .+..+++..+. ", |
63 | " .++...+...++. ", | 62 | " .++...+...++. ", |
64 | " .+++.....+++. ", | 63 | " .+++.....+++. ", |
65 | " .++++...++++. ", | 64 | " .++++...++++. ", |
66 | " .+++.....+++. ", | 65 | " .+++.....+++. ", |
67 | " .++...+...++. ", | 66 | " .++...+...++. ", |
68 | " .+..+++..+. ", | 67 | " .+..+++..+. ", |
@@ -866,49 +865,48 @@ void QPEDecoration::minimize( QWidget *widget ) | |||
866 | help( widget ); | 865 | help( widget ); |
867 | } | 866 | } |
868 | } | 867 | } |
869 | 868 | ||
870 | void QPEDecoration::help( QWidget *w ) | 869 | void QPEDecoration::help( QWidget *w ) |
871 | { | 870 | { |
872 | if ( helpExists ) { | 871 | if ( helpExists ) { |
873 | Global::execute( "helpbrowser", helpFile ); | 872 | Global::execute( "helpbrowser", helpFile ); |
874 | } else if ( w && w->testWFlags(Qt::WStyle_ContextHelp) ) { | 873 | } else if ( w && w->testWFlags(Qt::WStyle_ContextHelp) ) { |
875 | QWhatsThis::enterWhatsThisMode(); | 874 | QWhatsThis::enterWhatsThisMode(); |
876 | QWhatsThis::leaveWhatsThisMode( qApp->tr( | 875 | QWhatsThis::leaveWhatsThisMode( qApp->tr( |
877 | "<Qt>Comprehensive help is not available for this application, " | 876 | "<Qt>Comprehensive help is not available for this application, " |
878 | "however there is context-sensitive help.<p>To use context-sensitive help:<p>" | 877 | "however there is context-sensitive help.<p>To use context-sensitive help:<p>" |
879 | "<ol><li>click and hold the help button." | 878 | "<ol><li>click and hold the help button." |
880 | "<li>when the title bar shows <b>What's this...</b>, " | 879 | "<li>when the title bar shows <b>What's this...</b>, " |
881 | "click on any control.</ol></Qt>" ) ); | 880 | "click on any control.</ol></Qt>" ) ); |
882 | } | 881 | } |
883 | } | 882 | } |
884 | 883 | ||
885 | void QPEDecoration::windowData( const QWidget *w, WindowDecorationInterface::WindowData &wd ) const | 884 | void QPEDecoration::windowData( const QWidget *w, WindowDecorationInterface::WindowData &wd ) const |
886 | { | 885 | { |
887 | wd.rect = w->rect(); | 886 | wd.rect = w->rect(); |
888 | if ( qpeManager->whatsThisWidget() == w ) | 887 | if ( qpeManager->whatsThisWidget() == w ) |
889 | wd.caption = qApp->tr("What's this..." ); | 888 | wd.caption = qApp->tr("What's this..." ); |
890 | else | 889 | else |
891 | wd.caption = w->caption(); | 890 | wd.caption = w->caption(); |
892 | wd.palette = qApp->palette(); | 891 | wd.palette = qApp->palette(); |
893 | wd.flags = 0; | 892 | wd.flags = 0; |
894 | wd.flags |= w->isMaximized() ? WindowDecorationInterface::WindowData::Maximized : 0; | 893 | wd.flags |= w->isMaximized() ? WindowDecorationInterface::WindowData::Maximized : 0; |
895 | wd.flags |= w->testWFlags(Qt::WStyle_Dialog) ? WindowDecorationInterface::WindowData::Dialog : 0; | 894 | wd.flags |= w->testWFlags(Qt::WStyle_Dialog) ? WindowDecorationInterface::WindowData::Dialog : 0; |
896 | const QWidget *active = qpeManager->activeWidget(); | 895 | const QWidget *active = qpeManager->activeWidget(); |
897 | wd.flags |= w == active ? WindowDecorationInterface::WindowData::Active : 0; | 896 | wd.flags |= w == active ? WindowDecorationInterface::WindowData::Active : 0; |
898 | wd.reserved = 1; | 897 | wd.reserved = 1; |
899 | } | 898 | } |
900 | 899 | ||
901 | /* | 900 | /* |
902 | #ifndef QT_NO_POPUPMENU | 901 | #ifndef QT_NO_POPUPMENU |
903 | QPopupMenu *QPEDecoration::menu(QWSManager*, const QWidget*, const QPoint&) | 902 | QPopupMenu *QPEDecoration::menu(QWSManager*, const QWidget*, const QPoint&) |
904 | { | 903 | { |
905 | return 0; | 904 | return 0; |
906 | } | 905 | } |
907 | #endif | 906 | #endif |
908 | */ | 907 | */ |
909 | 908 | ||
910 | 909 | ||
911 | 910 | ||
912 | 911 | ||
913 | #endif // QT_NO_QWS_QPE_WM_STYLE | 912 | #endif // QT_NO_QWS_QPE_WM_STYLE |
914 | #endif | ||