Diffstat (limited to 'core/applets/aboutapplet/about.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/aboutapplet/about.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/core/applets/aboutapplet/about.cpp b/core/applets/aboutapplet/about.cpp index 3952d0a..1dbd4c4 100644 --- a/core/applets/aboutapplet/about.cpp +++ b/core/applets/aboutapplet/about.cpp | |||
@@ -1,28 +1,29 @@ | |||
1 | #include "about.h" | 1 | #include "about.h" |
2 | #include "dialog.h" | 2 | #include "widget.h" |
3 | 3 | ||
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include <qpe/resource.h> | 5 | #include <qpe/resource.h> |
6 | #include <qpe/qcopenvelope_qws.h> | 6 | #include <qpe/qcopenvelope_qws.h> |
7 | 7 | ||
8 | #include <qapplication.h> | ||
9 | #include <qlabel.h> | 8 | #include <qlabel.h> |
10 | 9 | ||
11 | AboutApplet::AboutApplet ( ) | 10 | AboutApplet::AboutApplet ( ) |
12 | : QObject ( 0, "AboutApplet" ) | 11 | : QObject ( 0, "AboutApplet" ), m_ad( 0l ) |
13 | {} | 12 | {} |
14 | 13 | ||
15 | AboutApplet::~AboutApplet ( ) | 14 | AboutApplet::~AboutApplet ( ) |
16 | {} | 15 | { |
16 | delete m_ad; | ||
17 | } | ||
17 | 18 | ||
18 | int AboutApplet::position ( ) const | 19 | int AboutApplet::position ( ) const |
19 | { | 20 | { |
20 | return 1; | 21 | return 1; |
21 | } | 22 | } |
22 | 23 | ||
23 | QString AboutApplet::name ( ) const | 24 | QString AboutApplet::name ( ) const |
24 | { | 25 | { |
25 | return tr( "About shortcut" ); | 26 | return tr( "About shortcut" ); |
26 | } | 27 | } |
27 | 28 | ||
28 | QString AboutApplet::text ( ) const | 29 | QString AboutApplet::text ( ) const |
@@ -48,31 +49,28 @@ QIconSet AboutApplet::icon ( ) const | |||
48 | if ( !img. isNull ( ) ) | 49 | if ( !img. isNull ( ) ) |
49 | pix. convertFromImage ( img. smoothScale ( 14, 14 ) ); | 50 | pix. convertFromImage ( img. smoothScale ( 14, 14 ) ); |
50 | return pix; | 51 | return pix; |
51 | } | 52 | } |
52 | 53 | ||
53 | QPopupMenu *AboutApplet::popup ( QWidget * ) const | 54 | QPopupMenu *AboutApplet::popup ( QWidget * ) const |
54 | { | 55 | { |
55 | return 0; | 56 | return 0; |
56 | } | 57 | } |
57 | 58 | ||
58 | void AboutApplet::activated() | 59 | void AboutApplet::activated() |
59 | { | 60 | { |
60 | AboutDialog* d = new AboutDialog( qApp->mainWidget(), "aboutDialog", true ); | 61 | if ( !m_ad ) |
61 | if ( qApp->desktop()->width() == 240 ) | 62 | m_ad = new AboutWidget( 0, "aboutDialog" ); |
62 | { | 63 | |
63 | d->logo->hide(); | 64 | QPEApplication::showWidget( m_ad ); |
64 | d->showMaximized(); | ||
65 | } | ||
66 | d->exec(); | ||
67 | } | 65 | } |
68 | 66 | ||
69 | QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 67 | QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
70 | { | 68 | { |
71 | *iface = 0; | 69 | *iface = 0; |
72 | if ( uuid == IID_QUnknown ) | 70 | if ( uuid == IID_QUnknown ) |
73 | * iface = this; | 71 | * iface = this; |
74 | else if ( uuid == IID_MenuApplet ) | 72 | else if ( uuid == IID_MenuApplet ) |
75 | * iface = this; | 73 | * iface = this; |
76 | else | 74 | else |
77 | return QS_FALSE; | 75 | return QS_FALSE; |
78 | 76 | ||