summaryrefslogtreecommitdiff
authorzecke <zecke>2002-09-30 20:00:24 (UTC)
committer zecke <zecke>2002-09-30 20:00:24 (UTC)
commit5158385997be6b64cab623674f9e9e1835f94fc6 (patch) (side-by-side diff)
tree2d07acbb8bceb6aa1b9f481d7069d35a0a0883c5
parenta0f88d7d0fb0ffaf8d1aa7b753b0d48ee344e34f (diff)
downloadopie-5158385997be6b64cab623674f9e9e1835f94fc6.zip
opie-5158385997be6b64cab623674f9e9e1835f94fc6.tar.gz
opie-5158385997be6b64cab623674f9e9e1835f94fc6.tar.bz2
Add missing files spotted by Robert Wittams
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector/ofileselectormain.cpp41
-rw-r--r--libopie/ofileselector/ofileselectormain.h23
2 files changed, 64 insertions, 0 deletions
diff --git a/libopie/ofileselector/ofileselectormain.cpp b/libopie/ofileselector/ofileselectormain.cpp
new file mode 100644
index 0000000..dd3b08c
--- a/dev/null
+++ b/libopie/ofileselector/ofileselectormain.cpp
@@ -0,0 +1,41 @@
+#include <qwidgetstack.h>
+#include <qlayout.h>
+
+#include "ofileselectormain.h"
+
+OFileSelectorMain::OFileSelectorMain( QWidget* parent )
+ : QWidget( parent ), m_tool(0)
+{
+ m_lay = 0;
+ init();
+}
+OFileSelectorMain::~OFileSelectorMain() {
+
+}
+void OFileSelectorMain::setToolbar( QWidget* tool ) {
+ delete m_tool;
+ m_tool = tool;
+ add();
+}
+void OFileSelectorMain::setWidget( QWidget* wid ) {
+ static int i = 0;
+ m_stack->addWidget( wid, i );
+ m_stack->raiseWidget( i );
+ i++;
+}
+void OFileSelectorMain::add() {
+ qWarning("adding items ");
+ if (m_tool )
+ m_lay->addWidget( m_tool, 0, 0 );
+
+}
+void OFileSelectorMain::init() {
+ delete m_lay;
+
+ m_lay = new QGridLayout( this, 2, 1 );
+ m_lay->setRowStretch( 0, 1 );
+ m_lay->setRowStretch( 1, 500 );
+
+ m_stack = new QWidgetStack( this );
+ m_lay->addWidget( m_stack, 1, 0 );
+}
diff --git a/libopie/ofileselector/ofileselectormain.h b/libopie/ofileselector/ofileselectormain.h
new file mode 100644
index 0000000..b540b9a
--- a/dev/null
+++ b/libopie/ofileselector/ofileselectormain.h
@@ -0,0 +1,23 @@
+#ifndef OPIE_FILESELECTOR_MAIN_H
+#define OPIE_FILESELECTOR_MAIN_H
+
+#include <qwidget.h>
+
+class QGridLayout;
+class QWidgetStack;
+class OFileSelectorMain : public QWidget {
+ Q_OBJECT
+public:
+ OFileSelectorMain( QWidget* parent );
+ ~OFileSelectorMain();
+ void setToolbar( QWidget* tool );
+ void setWidget( QWidget* view );
+private:
+ void init();
+ void add();
+ QGridLayout *m_lay;
+ QWidget* m_tool;
+ QWidgetStack *m_stack;
+};
+
+#endif