-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 | 21 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.pro | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/tabwidget.cpp | 22 | ||||
-rw-r--r-- | noncore/apps/opie-console/tabwidget.h | 4 |
7 files changed, 43 insertions, 19 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,3 +1,7 @@ | |||
1 | configurebase.cpp | ||
2 | configurebase.h | ||
3 | editbase.cpp | ||
4 | editbase.h | ||
1 | moc*.cpp | 5 | moc*.cpp |
2 | Makefile | 6 | Makefile |
3 | Makefile.in | 7 | Makefile.in |
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 | |||
@@ -1,59 +1,61 @@ | |||
1 | #ifndef OPIE_FILE_LAYER_H | 1 | #ifndef OPIE_FILE_LAYER_H |
2 | #define OPIE_FILE_LAYER_H | 2 | #define OPIE_FILE_LAYER_H |
3 | 3 | ||
4 | #include "io_layer.h" | 4 | #include "io_layer.h" |
5 | #include <opie/oprocess.h> | 5 | #include <opie/oprocess.h> |
6 | 6 | ||
7 | class QFile; | 7 | class QFile; |
8 | /** | 8 | /** |
9 | * this is the layer for sending files | 9 | * this is the layer for sending files |
10 | */ | 10 | */ |
11 | class FileTransferLayer : public QObject { | 11 | class FileTransferLayer : public QObject { |
12 | |||
12 | Q_OBJECT | 13 | Q_OBJECT |
14 | |||
13 | public: | 15 | public: |
14 | /** | 16 | /** |
15 | *the io layer to be used | 17 | *the io layer to be used |
16 | */ | 18 | */ |
17 | FileTransferLayer( IOLayer* ); | 19 | FileTransferLayer( IOLayer* ); |
18 | virtual ~FileTransferLayer(); | 20 | virtual ~FileTransferLayer(); |
19 | 21 | ||
20 | public slots: | 22 | public slots: |
21 | /** | 23 | /** |
22 | * send a file over the layer | 24 | * send a file over the layer |
23 | */ | 25 | */ |
24 | virtual void sendFile( const QString& file ) = 0; | 26 | virtual void sendFile( const QString& file ) = 0; |
25 | virtual void sendFile( const QFile& ) = 0; | 27 | virtual void sendFile( const QFile& ) = 0; |
26 | 28 | ||
27 | private slots: | 29 | private slots: |
28 | void SzRecievedStdout(OProcess *, char *, int); | 30 | void SzRecievedStdout(OProcess *, char *, int); |
29 | void SzRecievedStderr(OProcess *, char *, int); | 31 | void SzRecievedStderr(OProcess *, char *, int); |
30 | void recievedStdin(QByteArray &); | 32 | void recievedStdin(QByteArray &); |
31 | 33 | ||
32 | signals: | 34 | signals: |
33 | /** | 35 | /** |
34 | * sent the file | 36 | * sent the file |
35 | */ | 37 | */ |
36 | void sent(); | 38 | void sent(); |
37 | 39 | ||
38 | /** | 40 | /** |
39 | * an error occured | 41 | * an error occured |
40 | */ | 42 | */ |
41 | 43 | ||
42 | void error( int, const QString& ); | 44 | void error( int, const QString& ); |
43 | 45 | ||
44 | /* | 46 | /* |
45 | * 100 == done | 47 | * 100 == done |
46 | * | 48 | * |
47 | */ | 49 | */ |
48 | void progress( const QString& file, int progress ); | 50 | void progress( const QString& file, int progress ); |
49 | 51 | ||
50 | protected: | 52 | protected: |
51 | IOLayer* layer(); | 53 | IOLayer* layer(); |
52 | 54 | ||
53 | private: | 55 | private: |
54 | IOLayer* m_layer; | 56 | IOLayer* m_layer; |
55 | OProcess *proc; | 57 | OProcess *proc; |
56 | 58 | ||
57 | }; | 59 | }; |
58 | 60 | ||
59 | #endif | 61 | #endif |
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 | |||
@@ -1,167 +1,176 @@ | |||
1 | 1 | ||
2 | #include <qaction.h> | 2 | #include <qaction.h> |
3 | #include <qmenubar.h> | 3 | #include <qmenubar.h> |
4 | #include <qlabel.h> | 4 | #include <qlabel.h> |
5 | #include <qpopupmenu.h> | 5 | #include <qpopupmenu.h> |
6 | #include <qtoolbar.h> | 6 | #include <qtoolbar.h> |
7 | 7 | ||
8 | #include "configdialog.h" | 8 | #include "configdialog.h" |
9 | #include "metafactory.h" | 9 | #include "metafactory.h" |
10 | #include "profilemanager.h" | 10 | #include "profilemanager.h" |
11 | #include "mainwindow.h" | 11 | #include "mainwindow.h" |
12 | #include "tabwidget.h" | ||
12 | 13 | ||
13 | MainWindow::MainWindow() { | 14 | MainWindow::MainWindow() { |
14 | m_factory = new MetaFactory(); | 15 | m_factory = new MetaFactory(); |
15 | m_sessions.setAutoDelete( TRUE ); | 16 | m_sessions.setAutoDelete( TRUE ); |
16 | m_curSession = 0; | 17 | m_curSession = 0; |
17 | m_manager = new ProfileManager(m_factory); | 18 | m_manager = new ProfileManager(m_factory); |
18 | m_manager->load(); | 19 | m_manager->load(); |
19 | 20 | ||
20 | initUI(); | 21 | initUI(); |
21 | populateProfiles(); | 22 | populateProfiles(); |
22 | } | 23 | } |
23 | void MainWindow::initUI() { | 24 | void MainWindow::initUI() { |
24 | setToolBarsMovable( FALSE ); | 25 | setToolBarsMovable( FALSE ); |
25 | 26 | ||
26 | m_tool = new QToolBar( this ); | 27 | m_tool = new QToolBar( this ); |
27 | m_tool->setHorizontalStretchable( TRUE ); | 28 | m_tool->setHorizontalStretchable( TRUE ); |
28 | 29 | ||
29 | m_bar = new QMenuBar( m_tool ); | 30 | m_bar = new QMenuBar( m_tool ); |
30 | m_console = new QPopupMenu( this ); | 31 | m_console = new QPopupMenu( this ); |
31 | m_sessionsPop= new QPopupMenu( this ); | 32 | m_sessionsPop= new QPopupMenu( this ); |
32 | m_settings = new QPopupMenu( this ); | 33 | m_settings = new QPopupMenu( this ); |
33 | 34 | ||
34 | /* | 35 | /* |
35 | * new Action for new sessions | 36 | * new Action for new sessions |
36 | */ | 37 | */ |
37 | QAction* a = new QAction(); | 38 | QAction* a = new QAction(); |
38 | a->setText( tr("New Connection") ); | 39 | a->setText( tr("New Connection") ); |
39 | a->addTo( m_console ); | 40 | a->addTo( m_console ); |
40 | connect(a, SIGNAL(activated() ), | 41 | connect(a, SIGNAL(activated() ), |
41 | this, SLOT(slotNew() ) ); | 42 | this, SLOT(slotNew() ) ); |
42 | 43 | ||
43 | |||
44 | |||
45 | /* | 44 | /* |
46 | * connect action | 45 | * connect action |
47 | */ | 46 | */ |
48 | m_connect = new QAction(); | 47 | m_connect = new QAction(); |
49 | m_connect->setText( tr("Connect") ); | 48 | m_connect->setText( tr("Connect") ); |
50 | m_connect->addTo( m_console ); | 49 | m_connect->addTo( m_console ); |
51 | connect(m_connect, SIGNAL(activated() ), | 50 | connect(m_connect, SIGNAL(activated() ), |
52 | this, SLOT(slotConnect() ) ); | 51 | this, SLOT(slotConnect() ) ); |
53 | 52 | ||
54 | |||
55 | /* | 53 | /* |
56 | * disconnect action | 54 | * disconnect action |
57 | */ | 55 | */ |
58 | m_disconnect = new QAction(); | 56 | m_disconnect = new QAction(); |
59 | m_disconnect->setText( tr("Disconnect") ); | 57 | m_disconnect->setText( tr("Disconnect") ); |
60 | m_disconnect->addTo( m_console ); | 58 | m_disconnect->addTo( m_console ); |
61 | connect(m_disconnect, SIGNAL(activated() ), | 59 | connect(m_disconnect, SIGNAL(activated() ), |
62 | this, SLOT(slotDisconnect() ) ); | 60 | this, SLOT(slotDisconnect() ) ); |
63 | 61 | ||
64 | /* | 62 | /* |
65 | * terminate action | 63 | * terminate action |
66 | */ | 64 | */ |
67 | m_terminate = new QAction(); | 65 | m_terminate = new QAction(); |
68 | m_terminate->setText( tr("Terminate") ); | 66 | m_terminate->setText( tr("Terminate") ); |
69 | m_terminate->addTo( m_console ); | 67 | m_terminate->addTo( m_console ); |
70 | connect(m_disconnect, SIGNAL(activated() ), | 68 | connect(m_disconnect, SIGNAL(activated() ), |
71 | this, SLOT(slotTerminate() ) ); | 69 | this, SLOT(slotTerminate() ) ); |
72 | 70 | ||
73 | a = new QAction(); | 71 | a = new QAction(); |
74 | a->setText( tr("Close Window") ); | 72 | a->setText( tr("Close Window") ); |
75 | a->addTo( m_console ); | 73 | a->addTo( m_console ); |
76 | connect(a, SIGNAL(activated() ), | 74 | connect(a, SIGNAL(activated() ), |
77 | this, SLOT(slotClose() ) ); | 75 | this, SLOT(slotClose() ) ); |
78 | 76 | ||
79 | /* | 77 | /* |
80 | * the settings action | 78 | * the settings action |
81 | */ | 79 | */ |
82 | m_setProfiles = new QAction(); | 80 | m_setProfiles = new QAction(); |
83 | m_setProfiles->setText( tr("Configure Profiles") ); | 81 | m_setProfiles->setText( tr("Configure Profiles") ); |
84 | m_setProfiles->addTo( m_settings ); | 82 | m_setProfiles->addTo( m_settings ); |
85 | connect( m_setProfiles, SIGNAL(activated() ), | 83 | connect( m_setProfiles, SIGNAL(activated() ), |
86 | this, SLOT(slotConfigure() ) ); | 84 | this, SLOT(slotConfigure() ) ); |
87 | 85 | ||
88 | /* insert the submenu */ | 86 | /* insert the submenu */ |
89 | m_console->insertItem(tr("New from Profile"), m_sessionsPop, | 87 | m_console->insertItem(tr("New from Profile"), m_sessionsPop, |
90 | -1, 0); | 88 | -1, 0); |
91 | 89 | ||
92 | /* insert the connection menu */ | 90 | /* insert the connection menu */ |
93 | m_bar->insertItem( tr("Connection"), m_console ); | 91 | m_bar->insertItem( tr("Connection"), m_console ); |
94 | 92 | ||
95 | /* the settings menu */ | 93 | /* the settings menu */ |
96 | m_bar->insertItem( tr("Settings"), m_settings ); | 94 | m_bar->insertItem( tr("Settings"), m_settings ); |
97 | 95 | ||
98 | /* | 96 | /* |
99 | * connect to the menu activation | 97 | * connect to the menu activation |
100 | */ | 98 | */ |
101 | connect( m_sessionsPop, SIGNAL(activated(int) ), | 99 | connect( m_sessionsPop, SIGNAL(activated(int) ), |
102 | this, SLOT(slotProfile(int) ) ); | 100 | this, SLOT(slotProfile(int) ) ); |
103 | 101 | ||
102 | m_consoleWindow = new TabWidget( this, "blah"); | ||
103 | setCentralWidget( m_consoleWindow ); | ||
104 | |||
104 | } | 105 | } |
106 | |||
105 | ProfileManager* MainWindow::manager() { | 107 | ProfileManager* MainWindow::manager() { |
106 | return m_manager; | 108 | return m_manager; |
107 | } | 109 | } |
110 | |||
108 | void MainWindow::populateProfiles() { | 111 | void MainWindow::populateProfiles() { |
109 | m_sessionsPop->clear(); | 112 | m_sessionsPop->clear(); |
110 | Profile::ValueList list = manager()->all(); | 113 | Profile::ValueList list = manager()->all(); |
111 | for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); | 114 | for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) { |
112 | ++it ) { | ||
113 | m_sessionsPop->insertItem( (*it).name() ); | 115 | m_sessionsPop->insertItem( (*it).name() ); |
114 | } | 116 | } |
115 | 117 | ||
116 | } | 118 | } |
117 | MainWindow::~MainWindow() { | 119 | MainWindow::~MainWindow() { |
118 | delete m_factory; | 120 | delete m_factory; |
119 | } | 121 | } |
120 | 122 | ||
121 | MetaFactory* MainWindow::factory() { | 123 | MetaFactory* MainWindow::factory() { |
122 | return m_factory; | 124 | return m_factory; |
123 | } | 125 | } |
124 | 126 | ||
125 | Session* MainWindow::currentSession() { | 127 | Session* MainWindow::currentSession() { |
126 | return m_curSession; | 128 | return m_curSession; |
127 | } | 129 | } |
128 | 130 | ||
129 | QList<Session> MainWindow::sessions() { | 131 | QList<Session> MainWindow::sessions() { |
130 | return m_sessions; | 132 | return m_sessions; |
131 | } | 133 | } |
134 | |||
132 | void MainWindow::slotNew() { | 135 | void MainWindow::slotNew() { |
133 | qWarning("New Connection"); | 136 | qWarning("New Connection"); |
134 | } | 137 | } |
138 | |||
135 | void MainWindow::slotConnect() { | 139 | void MainWindow::slotConnect() { |
136 | if ( currentSession() ) | 140 | if ( currentSession() ) |
137 | currentSession()->layer()->open(); | 141 | currentSession()->layer()->open(); |
138 | } | 142 | } |
143 | |||
139 | void MainWindow::slotDisconnect() { | 144 | void MainWindow::slotDisconnect() { |
140 | if ( currentSession() ) | 145 | if ( currentSession() ) |
141 | currentSession()->layer()->close(); | 146 | currentSession()->layer()->close(); |
142 | } | 147 | } |
148 | |||
143 | void MainWindow::slotTerminate() { | 149 | void MainWindow::slotTerminate() { |
144 | if ( currentSession() ) | 150 | if ( currentSession() ) |
145 | currentSession()->layer()->close(); | 151 | currentSession()->layer()->close(); |
146 | delete m_curSession; | 152 | delete m_curSession; |
147 | m_curSession = 0l; | 153 | m_curSession = 0l; |
148 | /* FIXME move to the next session */ | 154 | /* FIXME move to the next session */ |
149 | } | 155 | } |
156 | |||
150 | void MainWindow::slotConfigure() { | 157 | void MainWindow::slotConfigure() { |
151 | qWarning("configure"); | 158 | qWarning("configure"); |
152 | ConfigDialog conf( manager()->all() ); | 159 | ConfigDialog conf( manager()->all() ); |
153 | conf.showMaximized(); | 160 | conf.showMaximized(); |
154 | 161 | ||
155 | int ret = conf.exec(); | 162 | int ret = conf.exec(); |
156 | 163 | ||
157 | if ( QDialog::Accepted == ret ) { | 164 | if ( QDialog::Accepted == ret ) { |
158 | manager()->setProfiles( conf.list() ); | 165 | manager()->setProfiles( conf.list() ); |
159 | populateProfiles(); | 166 | populateProfiles(); |
160 | } | 167 | } |
161 | } | 168 | } |
169 | |||
162 | void MainWindow::slotClose() { | 170 | void MainWindow::slotClose() { |
163 | 171 | ||
164 | } | 172 | } |
173 | |||
165 | void MainWindow::slotProfile(int) { | 174 | void MainWindow::slotProfile(int) { |
166 | 175 | ||
167 | } | 176 | } |
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 | |||
@@ -1,89 +1,91 @@ | |||
1 | #ifndef OPIE_MAIN_WINDOW_H | 1 | #ifndef OPIE_MAIN_WINDOW_H |
2 | #define OPIE_MAIN_WINDOW_H | 2 | #define OPIE_MAIN_WINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | #include <qlist.h> | 5 | #include <qlist.h> |
6 | 6 | ||
7 | #include "session.h" | 7 | #include "session.h" |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * this is the MainWindow of the new opie console | 10 | * this is the MainWindow of the new opie console |
11 | * it's also the dispatcher between the different | 11 | * it's also the dispatcher between the different |
12 | * actions supported by the gui | 12 | * actions supported by the gui |
13 | */ | 13 | */ |
14 | class QToolBar; | 14 | class QToolBar; |
15 | class QMenuBar; | 15 | class QMenuBar; |
16 | class QAction; | 16 | class QAction; |
17 | class MetaFactory; | 17 | class MetaFactory; |
18 | 18 | class TabWidget; | |
19 | class ProfileManager; | 19 | class ProfileManager; |
20 | |||
20 | class MainWindow : public QMainWindow { | 21 | class MainWindow : public QMainWindow { |
21 | Q_OBJECT | 22 | Q_OBJECT |
22 | public: | 23 | public: |
23 | MainWindow( ); | 24 | MainWindow(); |
24 | ~MainWindow(); | 25 | ~MainWindow(); |
25 | 26 | ||
26 | /** | 27 | /** |
27 | * our factory to generate IOLayer and so on | 28 | * our factory to generate IOLayer and so on |
28 | * | 29 | * |
29 | */ | 30 | */ |
30 | MetaFactory* factory(); | 31 | MetaFactory* factory(); |
31 | 32 | ||
32 | /** | 33 | /** |
33 | * A session contains a QWidget*, | 34 | * A session contains a QWidget*, |
34 | * an IOLayer* and some infos for us | 35 | * an IOLayer* and some infos for us |
35 | */ | 36 | */ |
36 | Session* currentSession(); | 37 | Session* currentSession(); |
37 | 38 | ||
38 | /** | 39 | /** |
39 | * the session list | 40 | * the session list |
40 | */ | 41 | */ |
41 | QList<Session> sessions(); | 42 | QList<Session> sessions(); |
42 | 43 | ||
43 | /** | 44 | /** |
44 | * | 45 | * |
45 | */ | 46 | */ |
46 | ProfileManager* manager(); | 47 | ProfileManager* manager(); |
47 | 48 | ||
48 | private slots: | 49 | private slots: |
49 | void slotNew(); | 50 | void slotNew(); |
50 | void slotConnect(); | 51 | void slotConnect(); |
51 | void slotDisconnect(); | 52 | void slotDisconnect(); |
52 | void slotTerminate(); | 53 | void slotTerminate(); |
53 | void slotConfigure(); | 54 | void slotConfigure(); |
54 | void slotClose(); | 55 | void slotClose(); |
55 | void slotProfile(int); | 56 | void slotProfile(int); |
56 | 57 | ||
57 | private: | 58 | private: |
58 | void initUI(); | 59 | void initUI(); |
59 | void populateProfiles(); | 60 | void populateProfiles(); |
60 | /** | 61 | /** |
61 | * the current session | 62 | * the current session |
62 | */ | 63 | */ |
63 | Session* m_curSession; | 64 | Session* m_curSession; |
64 | 65 | ||
65 | /** | 66 | /** |
66 | * the session list | 67 | * the session list |
67 | */ | 68 | */ |
68 | QList<Session> m_sessions; | 69 | QList<Session> m_sessions; |
69 | 70 | ||
70 | /** | 71 | /** |
71 | * the metafactory | 72 | * the metafactory |
72 | */ | 73 | */ |
73 | MetaFactory* m_factory; | 74 | MetaFactory* m_factory; |
74 | ProfileManager* m_manager; | 75 | ProfileManager* m_manager; |
75 | 76 | ||
77 | TabWidget* m_consoleWindow; | ||
76 | QToolBar* m_tool; | 78 | QToolBar* m_tool; |
77 | QMenuBar* m_bar; | 79 | QMenuBar* m_bar; |
78 | QPopupMenu* m_console; | 80 | QPopupMenu* m_console; |
79 | QPopupMenu* m_settings; | 81 | QPopupMenu* m_settings; |
80 | QPopupMenu* m_sessionsPop; | 82 | QPopupMenu* m_sessionsPop; |
81 | QAction* m_connect; | 83 | QAction* m_connect; |
82 | QAction* m_disconnect; | 84 | QAction* m_disconnect; |
83 | QAction* m_terminate; | 85 | QAction* m_terminate; |
84 | QAction* m_setProfiles; | 86 | QAction* m_setProfiles; |
85 | 87 | ||
86 | }; | 88 | }; |
87 | 89 | ||
88 | 90 | ||
89 | #endif | 91 | #endif |
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,47 +1,48 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on release | 2 | #CONFIG = qt warn_on release |
3 | CONFIG = qt debug | ||
3 | DESTDIR = $(OPIEDIR)/bin | 4 | DESTDIR = $(OPIEDIR)/bin |
4 | HEADERS = io_layer.h io_serial.h \ | 5 | HEADERS = io_layer.h io_serial.h \ |
5 | file_layer.h \ | 6 | file_layer.h \ |
6 | metafactory.h \ | 7 | metafactory.h \ |
7 | session.h \ | 8 | session.h \ |
8 | mainwindow.h \ | 9 | mainwindow.h \ |
9 | profile.h \ | 10 | profile.h \ |
10 | profileconfig.h \ | 11 | profileconfig.h \ |
11 | profilemanager.h \ | 12 | profilemanager.h \ |
12 | configwidget.h \ | 13 | configwidget.h \ |
13 | tabwidget.h \ | 14 | tabwidget.h \ |
14 | configdialog.h \ | 15 | configdialog.h \ |
15 | profileeditordialog.h \ | 16 | profileeditordialog.h \ |
16 | emulation_layer.h \ | 17 | emulation_layer.h \ |
17 | widget.h \ | 18 | widget.h \ |
18 | vt102emulation.h \ | 19 | vt102emulation.h \ |
19 | common.h \ | 20 | common.h \ |
20 | history.h \ | 21 | history.h \ |
21 | screen.h \ | 22 | screen.h \ |
22 | keytrans.h | 23 | keytrans.h |
23 | 24 | ||
24 | SOURCES = io_layer.cpp io_serial.cpp \ | 25 | SOURCES = io_layer.cpp io_serial.cpp \ |
25 | file_layer.cpp main.cpp \ | 26 | file_layer.cpp main.cpp \ |
26 | metafactory.cpp \ | 27 | metafactory.cpp \ |
27 | session.cpp \ | 28 | session.cpp \ |
28 | mainwindow.cpp \ | 29 | mainwindow.cpp \ |
29 | profile.cpp \ | 30 | profile.cpp \ |
30 | profileconfig.cpp \ | 31 | profileconfig.cpp \ |
31 | profilemanager.cpp \ | 32 | profilemanager.cpp \ |
32 | tabwidget.cpp \ | 33 | tabwidget.cpp \ |
33 | configdialog.cpp \ | 34 | configdialog.cpp \ |
34 | profileeditordialog.cpp \ | 35 | profileeditordialog.cpp \ |
35 | emulation_layer.cpp \ | 36 | emulation_layer.cpp \ |
36 | widget.cpp \ | 37 | widget.cpp \ |
37 | vt102emulation.cpp \ | 38 | vt102emulation.cpp \ |
38 | history.cpp \ | 39 | history.cpp \ |
39 | screen.cpp \ | 40 | screen.cpp \ |
40 | keytrans.cpp | 41 | keytrans.cpp |
41 | 42 | ||
42 | INTERFACES = configurebase.ui editbase.ui | 43 | INTERFACES = configurebase.ui editbase.ui |
43 | INCLUDEPATH += $(OPIEDIR)/include | 44 | INCLUDEPATH += $(OPIEDIR)/include |
44 | DEPENDPATH += $(OPIEDIR)/include | 45 | DEPENDPATH += $(OPIEDIR)/include |
45 | LIBS += -lqpe -lopie | 46 | LIBS += -lqpe -lopie |
46 | TARGET = opie-console | 47 | TARGET = opie-console |
47 | 48 | ||
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 | |||
@@ -1,28 +1,34 @@ | |||
1 | 1 | ||
2 | #include "tabwidget.h" | 2 | #include "tabwidget.h" |
3 | 3 | ||
4 | TabWidget::TabWidget( QWidget* parent, const char* name ) | 4 | TabWidget::TabWidget( QWidget* parent, const char* name ) |
5 | : QTabWidget( parent, name ) | 5 | : OTabWidget( parent, name ) { |
6 | { | 6 | connect(this, SIGNAL( currentChanged(QWidget*) ), |
7 | connect(this, SIGNAL(currentChanged(QWidget*) ), | 7 | this, SLOT( slotCurChanged(QWidget*) ) ); |
8 | this, SLOT(slotCurChanged(QWidget*) ) ); | ||
9 | } | 8 | } |
9 | |||
10 | TabWidget::~TabWidget() { | 10 | TabWidget::~TabWidget() { |
11 | } | 11 | } |
12 | |||
12 | void TabWidget::add( Session* ses ) { | 13 | void TabWidget::add( Session* ses ) { |
13 | if ( !ses->widget() ) return; | 14 | if ( !ses->widget() ) return; |
14 | addTab( ses->widget(), ses->name() ); | 15 | addTab( ses->widget(), "console/konsole", ses->name() ); |
15 | m_map.insert( ses->widget(), ses ); | 16 | m_map.insert( ses->widget(), ses ); |
16 | } | 17 | } |
18 | |||
17 | void TabWidget::remove( Session* ses ) { | 19 | void TabWidget::remove( Session* ses ) { |
18 | m_map.remove( ses->widget() ); | 20 | m_map.remove( ses->widget() ); |
19 | removePage( ses->widget() ); | 21 | removePage( ses->widget() ); |
20 | } | 22 | } |
23 | |||
21 | void TabWidget::slotCurChanged( QWidget* wid ) { | 24 | void TabWidget::slotCurChanged( QWidget* wid ) { |
22 | QMap<QWidget*, Session*>::Iterator it; | 25 | QMap<QWidget*, Session*>::Iterator it; |
23 | it = m_map.find(wid ); | 26 | it = m_map.find( wid ); |
24 | if (it == m_map.end() ) | 27 | if ( it == m_map.end() ) { |
25 | return; | 28 | return; |
29 | } | ||
26 | 30 | ||
27 | emit activated( it.data() ); | 31 | emit activated( it.data() ); |
28 | } | 32 | } |
33 | |||
34 | |||
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 | |||
@@ -1,28 +1,28 @@ | |||
1 | #ifndef OPIE_TAB_WIDGET_H | 1 | #ifndef OPIE_TAB_WIDGET_H |
2 | #define OPIE_TAB_WIDGET_H | 2 | #define OPIE_TAB_WIDGET_H |
3 | 3 | ||
4 | #include <qmap.h> | 4 | #include <qmap.h> |
5 | #include <qtabwidget.h> | 5 | #include <opie/otabwidget.h> |
6 | 6 | ||
7 | #include "session.h" | 7 | #include "session.h" |
8 | /** | 8 | /** |
9 | * This is our central tab widget | 9 | * This is our central tab widget |
10 | * we can add sessions here | 10 | * we can add sessions here |
11 | */ | 11 | */ |
12 | class TabWidget : QTabWidget{ | 12 | class TabWidget : public OTabWidget{ |
13 | Q_OBJECT | 13 | Q_OBJECT |
14 | public: | 14 | public: |
15 | TabWidget(QWidget *parent, const char* name ); | 15 | TabWidget(QWidget *parent, const char* name ); |
16 | ~TabWidget(); | 16 | ~TabWidget(); |
17 | void add( Session* ); | 17 | void add( Session* ); |
18 | void remove( Session* ); | 18 | void remove( Session* ); |
19 | 19 | ||
20 | signals: | 20 | signals: |
21 | void activated(Session* ses ); | 21 | void activated(Session* ses ); |
22 | private slots: | 22 | private slots: |
23 | void slotCurChanged( QWidget* wid ); | 23 | void slotCurChanged( QWidget* wid ); |
24 | private: | 24 | private: |
25 | QMap<QWidget*, Session*> m_map; | 25 | QMap<QWidget*, Session*> m_map; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | #endif | 28 | #endif |