-rw-r--r-- | libopie2/opiecore/oapplication.cpp | 14 | ||||
-rw-r--r-- | libopie2/opiecore/oapplication.h | 16 |
2 files changed, 30 insertions, 0 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp index a0abcc2..12418d5 100644 --- a/libopie2/opiecore/oapplication.cpp +++ b/libopie2/opiecore/oapplication.cpp | |||
@@ -94,2 +94,3 @@ void OApplication::init() | |||
94 | 94 | ||
95 | |||
95 | void OApplication::setMainWidget( QWidget* widget ) | 96 | void OApplication::setMainWidget( QWidget* widget ) |
@@ -99,2 +100,3 @@ void OApplication::setMainWidget( QWidget* widget ) | |||
99 | 100 | ||
101 | |||
100 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) | 102 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) |
@@ -108,3 +110,15 @@ void OApplication::showMainWidget( QWidget* widget, bool nomax ) | |||
108 | widget->setCaption( _appname ); | 110 | widget->setCaption( _appname ); |
111 | } | ||
112 | |||
109 | 113 | ||
114 | void OApplication::setTitle( QString title ) const | ||
115 | { | ||
116 | if ( mainWidget() ) | ||
117 | { | ||
118 | if ( !title.isNull() ) | ||
119 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); | ||
120 | else | ||
121 | mainWidget()->setCaption( _appname ); | ||
122 | } | ||
110 | } | 123 | } |
124 | |||
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h index 736e786..4d25202 100644 --- a/libopie2/opiecore/oapplication.h +++ b/libopie2/opiecore/oapplication.h | |||
@@ -71,2 +71,3 @@ class OApplication: public OApplicationBaseClass | |||
71 | * to every function that may require it. | 71 | * to every function that may require it. |
72 | * | ||
72 | * @return the current application object | 73 | * @return the current application object |
@@ -94,2 +95,5 @@ class OApplication: public OApplicationBaseClass | |||
94 | * on Qt/Embedded. | 95 | * on Qt/Embedded. |
96 | * | ||
97 | * @param mainWidget the widget to become the main widget | ||
98 | * @see QWidget object | ||
95 | */ | 99 | */ |
@@ -100,2 +104,5 @@ class OApplication: public OApplicationBaseClass | |||
100 | * on platforms other than Qt/Embedded. | 104 | * on platforms other than Qt/Embedded. |
105 | * | ||
106 | * @param mainWidget the widget to become the main widget | ||
107 | * @see QWidget object | ||
101 | */ | 108 | */ |
@@ -103,2 +110,11 @@ class OApplication: public OApplicationBaseClass | |||
103 | 110 | ||
111 | /** | ||
112 | * Set the application title. The application title will be concatenated | ||
113 | * to the application name given in the constructor. | ||
114 | * | ||
115 | * @param title the title. If not given, resets caption to appname | ||
116 | */ | ||
117 | virtual void setTitle( QString title = QString::null ) const; | ||
118 | //virtual void setTitle() const; | ||
119 | |||
104 | protected: | 120 | protected: |