author | harlekin <harlekin> | 2002-10-05 22:21:04 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-05 22:21:04 (UTC) |
commit | 48b16b3a3557e70abf90e83b84396258b92b652e (patch) (side-by-side diff) | |
tree | 9dad37a08e79da5705a8297b2bf09a0b2441f3b6 /noncore | |
parent | 99425255c4afcd75ee6b2f903487cb958d3acdee (diff) | |
download | opie-48b16b3a3557e70abf90e83b84396258b92b652e.zip opie-48b16b3a3557e70abf90e83b84396258b92b652e.tar.gz opie-48b16b3a3557e70abf90e83b84396258b92b652e.tar.bz2 |
otabwidget instead of qtabwidget
-rw-r--r-- | noncore/apps/opie-console/.cvsignore | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/file_layer.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 19 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.pro | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/tabwidget.cpp | 14 | ||||
-rw-r--r-- | noncore/apps/opie-console/tabwidget.h | 4 |
7 files changed, 37 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/.cvsignore b/noncore/apps/opie-console/.cvsignore index acc07da..41d9740 100644 --- a/noncore/apps/opie-console/.cvsignore +++ b/noncore/apps/opie-console/.cvsignore @@ -1,2 +1,6 @@ +configurebase.cpp +configurebase.h +editbase.cpp +editbase.h moc*.cpp Makefile diff --git a/noncore/apps/opie-console/file_layer.h b/noncore/apps/opie-console/file_layer.h index 71a0c82..cfa149e 100644 --- a/noncore/apps/opie-console/file_layer.h +++ b/noncore/apps/opie-console/file_layer.h @@ -10,5 +10,7 @@ class QFile; */ class FileTransferLayer : public QObject { + Q_OBJECT + public: /** diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 88d5823..dce08ca 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -10,4 +10,5 @@ #include "profilemanager.h" #include "mainwindow.h" +#include "tabwidget.h" MainWindow::MainWindow() { @@ -41,6 +42,4 @@ void MainWindow::initUI() { this, SLOT(slotNew() ) ); - - /* * connect action @@ -52,5 +51,4 @@ void MainWindow::initUI() { this, SLOT(slotConnect() ) ); - /* * disconnect action @@ -102,13 +100,17 @@ void MainWindow::initUI() { this, SLOT(slotProfile(int) ) ); + m_consoleWindow = new TabWidget( this, "blah"); + setCentralWidget( m_consoleWindow ); + } + ProfileManager* MainWindow::manager() { return m_manager; } + void MainWindow::populateProfiles() { m_sessionsPop->clear(); Profile::ValueList list = manager()->all(); - for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); - ++it ) { + for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) { m_sessionsPop->insertItem( (*it).name() ); } @@ -130,15 +132,19 @@ QList<Session> MainWindow::sessions() { return m_sessions; } + void MainWindow::slotNew() { qWarning("New Connection"); } + void MainWindow::slotConnect() { if ( currentSession() ) currentSession()->layer()->open(); } + void MainWindow::slotDisconnect() { if ( currentSession() ) currentSession()->layer()->close(); } + void MainWindow::slotTerminate() { if ( currentSession() ) @@ -148,4 +154,5 @@ void MainWindow::slotTerminate() { /* FIXME move to the next session */ } + void MainWindow::slotConfigure() { qWarning("configure"); @@ -160,7 +167,9 @@ void MainWindow::slotConfigure() { } } + void MainWindow::slotClose() { } + void MainWindow::slotProfile(int) { diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index be4b469..36eb3a7 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h @@ -16,6 +16,7 @@ class QMenuBar; class QAction; class MetaFactory; - +class TabWidget; class ProfileManager; + class MainWindow : public QMainWindow { Q_OBJECT @@ -74,4 +75,5 @@ private: ProfileManager* m_manager; + TabWidget* m_consoleWindow; QToolBar* m_tool; QMenuBar* m_bar; diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro index 0b5df20..7abf385 100644 --- a/noncore/apps/opie-console/opie-console.pro +++ b/noncore/apps/opie-console/opie-console.pro @@ -1,4 +1,5 @@ TEMPLATE = app -CONFIG = qt warn_on release +#CONFIG = qt warn_on release +CONFIG = qt debug DESTDIR = $(OPIEDIR)/bin HEADERS = io_layer.h io_serial.h \ diff --git a/noncore/apps/opie-console/tabwidget.cpp b/noncore/apps/opie-console/tabwidget.cpp index 6091aa2..783bf13 100644 --- a/noncore/apps/opie-console/tabwidget.cpp +++ b/noncore/apps/opie-console/tabwidget.cpp @@ -3,26 +3,32 @@ TabWidget::TabWidget( QWidget* parent, const char* name ) - : QTabWidget( parent, name ) -{ + : OTabWidget( parent, name ) { connect(this, SIGNAL(currentChanged(QWidget*) ), this, SLOT(slotCurChanged(QWidget*) ) ); } + TabWidget::~TabWidget() { } + void TabWidget::add( Session* ses ) { if ( !ses->widget() ) return; - addTab( ses->widget(), ses->name() ); + addTab( ses->widget(), "console/konsole", ses->name() ); m_map.insert( ses->widget(), ses ); } + void TabWidget::remove( Session* ses ) { m_map.remove( ses->widget() ); removePage( ses->widget() ); } + void TabWidget::slotCurChanged( QWidget* wid ) { QMap<QWidget*, Session*>::Iterator it; it = m_map.find(wid ); - if (it == m_map.end() ) + if ( it == m_map.end() ) { return; + } emit activated( it.data() ); } + + diff --git a/noncore/apps/opie-console/tabwidget.h b/noncore/apps/opie-console/tabwidget.h index d5d4be3..a701488 100644 --- a/noncore/apps/opie-console/tabwidget.h +++ b/noncore/apps/opie-console/tabwidget.h @@ -3,5 +3,5 @@ #include <qmap.h> -#include <qtabwidget.h> +#include <opie/otabwidget.h> #include "session.h" @@ -10,5 +10,5 @@ * we can add sessions here */ -class TabWidget : QTabWidget{ +class TabWidget : public OTabWidget{ Q_OBJECT public: |