summaryrefslogtreecommitdiff
path: root/libopie2/opieui/big-screen/owidgetstack.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opieui/big-screen/owidgetstack.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp
index 57e97e3..a0a6355 100644
--- a/libopie2/opieui/big-screen/owidgetstack.cpp
+++ b/libopie2/opieui/big-screen/owidgetstack.cpp
@@ -11,53 +11,53 @@
    .%`+i>       _;_.
    .i_,=:_.      -<s. This library is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "owidgetstack.h"
/* QT */
#include <qapplication.h>
#include <qwidgetstack.h>
-namespace {
+namespace Opie {
+namespace Ui {
const int mode_size = 330;
-}
-using namespace Opie;
+
/**
* This is the standard widget. For simple usage see the example. Normally this widget
* is the central widget of a QMainWindow.
* Use removeWidget before you delete a widget yourself. OWidgetStack does not
* yet recognize removal of children.
*
* @param parent The parent widget. It maybe 0 but then you need to take care of deletion.
* Or you use QPEApplication::showMainWidget().
* @param name Name will be passed on to QObject
* @param fl Additional window flags passed to QFrame. see @Qt::WFlags
*/
OWidgetStack::OWidgetStack( QWidget* parent, const char* name, WFlags fl)
: QFrame( parent, name, fl )
{
m_last = m_mWidget = 0;
m_forced = false;
QApplication::desktop()->installEventFilter( this );
setFontPropagation ( AllChildren );
setPalettePropagation( AllChildren );
/* sets m_mode and initializes more */
/* if you change this call change switchTop as well */
@@ -412,24 +412,27 @@ void OWidgetStack::switchTop() {
/* this works because it is guaranteed that switchStack was called at least once*/
if (!m_stack && m_mWidget) {
m_mWidget->setGeometry( frameRect() );
return;
}else if (!m_stack)
return;
if (!m_list.isEmpty() ) {
QMap<int, QWidget*>::Iterator it = m_list.begin();
for ( ; it != m_list.end(); ++it ) {
/* better than reparenting twice */
if ( it.data() == m_mWidget ) {
m_mWidget->reparent(this, 0, frameRect().topLeft() );
m_mWidget->setGeometry( frameRect() );
m_mWidget->show();
}else
/* ### FIXME we need to place the widget better */
it.data()->reparent(0, WType_TopLevel, QPoint(10, 10) );
}
}
delete m_stack;
m_stack = 0;
}
+
+}
+} \ No newline at end of file