From 99899abc80a8aa05044eeecd8a061b0a8efaa713 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 30 Mar 2003 01:41:56 +0000 Subject: - add classes for 802.11 tagged values - adjust miniwellenreiter accordingly --- (limited to 'libopie2/opiecore') 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 @@ -92,11 +92,13 @@ void OApplication::init() } } + void OApplication::setMainWidget( QWidget* widget ) { showMainWidget( widget ); } + void OApplication::showMainWidget( QWidget* widget, bool nomax ) { #ifdef Q_WS_QWS @@ -106,5 +108,17 @@ void OApplication::showMainWidget( QWidget* widget, bool nomax ) widget->show(); #endif widget->setCaption( _appname ); +} + +void OApplication::setTitle( QString title ) const +{ + if ( mainWidget() ) + { + if ( !title.isNull() ) + mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); + else + mainWidget()->setCaption( _appname ); + } } + 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 @@ -69,6 +69,7 @@ class OApplication: public OApplicationBaseClass * more than one cannot be created in the same application. It * saves you the trouble of having to pass the pointer explicitly * to every function that may require it. + * * @return the current application object */ static const OApplication* oApplication() { return _instance; }; @@ -92,15 +93,30 @@ class OApplication: public OApplicationBaseClass /** * Sets the main widget - reimplemented to call showMainWidget() * on Qt/Embedded. + * + * @param mainWidget the widget to become the main widget + * @see QWidget object */ virtual void setMainWidget( QWidget *mainWidget ); /** * Shows the main widget - reimplemented to call setMainWidget() * on platforms other than Qt/Embedded. + * + * @param mainWidget the widget to become the main widget + * @see QWidget object */ virtual void showMainWidget( QWidget* widget, bool nomax = false ); + /** + * Set the application title. The application title will be concatenated + * to the application name given in the constructor. + * + * @param title the title. If not given, resets caption to appname + */ + virtual void setTitle( QString title = QString::null ) const; + //virtual void setTitle() const; + protected: void init(); -- cgit v0.9.0.2