summaryrefslogtreecommitdiff
path: root/core/applets/aboutapplet/about.cpp
Unidiff
Diffstat (limited to 'core/applets/aboutapplet/about.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/aboutapplet/about.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/aboutapplet/about.cpp b/core/applets/aboutapplet/about.cpp
index bbdc1b1..3952d0a 100644
--- a/core/applets/aboutapplet/about.cpp
+++ b/core/applets/aboutapplet/about.cpp
@@ -1,27 +1,28 @@
1#include "about.h" 1#include "about.h"
2#include "dialog.h" 2#include "dialog.h"
3 3
4#include <qpe/qpeapplication.h>
4#include <qpe/resource.h> 5#include <qpe/resource.h>
5#include <qpe/qcopenvelope_qws.h> 6#include <qpe/qcopenvelope_qws.h>
6 7
7#include <qapplication.h> 8#include <qapplication.h>
8#include <qlabel.h> 9#include <qlabel.h>
9 10
10AboutApplet::AboutApplet ( ) 11AboutApplet::AboutApplet ( )
11 : QObject ( 0, "AboutApplet" ) 12 : QObject ( 0, "AboutApplet" )
12{} 13{}
13 14
14AboutApplet::~AboutApplet ( ) 15AboutApplet::~AboutApplet ( )
15{} 16{}
16 17
17int AboutApplet::position ( ) const 18int AboutApplet::position ( ) const
18{ 19{
19 return 1; 20 return 1;
20} 21}
21 22
22QString AboutApplet::name ( ) const 23QString AboutApplet::name ( ) const
23{ 24{
24 return tr( "About shortcut" ); 25 return tr( "About shortcut" );
25} 26}
26 27
27QString AboutApplet::text ( ) const 28QString AboutApplet::text ( ) const
@@ -39,50 +40,49 @@ QString AboutApplet::tr( const char* s, const char* p ) const
39 return qApp->translate( "AboutApplet", s, p ); 40 return qApp->translate( "AboutApplet", s, p );
40} 41}
41 42
42QIconSet AboutApplet::icon ( ) const 43QIconSet AboutApplet::icon ( ) const
43{ 44{
44 QPixmap pix; 45 QPixmap pix;
45 QImage img = Resource::loadImage ( "logo/opielogo" ); 46 QImage img = Resource::loadImage ( "logo/opielogo" );
46 47
47 if ( !img. isNull ( ) ) 48 if ( !img. isNull ( ) )
48 pix. convertFromImage ( img. smoothScale ( 14, 14 ) ); 49 pix. convertFromImage ( img. smoothScale ( 14, 14 ) );
49 return pix; 50 return pix;
50} 51}
51 52
52QPopupMenu *AboutApplet::popup ( QWidget * ) const 53QPopupMenu *AboutApplet::popup ( QWidget * ) const
53{ 54{
54 return 0; 55 return 0;
55} 56}
56 57
57void AboutApplet::activated() 58void AboutApplet::activated()
58{ 59{
59 AboutDialog* d = new AboutDialog( qApp->mainWidget(), "aboutDialog", true ); 60 AboutDialog* d = new AboutDialog( qApp->mainWidget(), "aboutDialog", true );
60 if ( qApp->desktop()->width() == 240 ) 61 if ( qApp->desktop()->width() == 240 )
61 { 62 {
62 d->logo->hide(); 63 d->logo->hide();
63 d->setFixedWidth( qApp->desktop()->width() - 5 ); 64 d->showMaximized();
64 d->setFixedHeight( qApp->desktop()->height() - 50 );
65 } 65 }
66 d->exec(); 66 d->exec();
67} 67}
68 68
69QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 69QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
70{ 70{
71 *iface = 0; 71 *iface = 0;
72 if ( uuid == IID_QUnknown ) 72 if ( uuid == IID_QUnknown )
73 * iface = this; 73 * iface = this;
74 else if ( uuid == IID_MenuApplet ) 74 else if ( uuid == IID_MenuApplet )
75 * iface = this; 75 * iface = this;
76 else 76 else
77 return QS_FALSE; 77 return QS_FALSE;
78 78
79 if ( *iface ) 79 if ( *iface )
80 ( *iface ) -> addRef ( ); 80 ( *iface ) -> addRef ( );
81 return QS_OK; 81 return QS_OK;
82} 82}
83 83
84Q_EXPORT_INTERFACE( ) 84Q_EXPORT_INTERFACE( )
85{ 85{
86 Q_CREATE_INSTANCE( AboutApplet ) 86 Q_CREATE_INSTANCE( AboutApplet )
87} 87}
88 88