author | zecke <zecke> | 2004-03-13 22:41:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 22:41:59 (UTC) |
commit | 3d27828732fe7e499219ad6e208dc13dead86431 (patch) (unidiff) | |
tree | faa42dec364ad1e0470a370c81d0a7dc0cd2f9bc /noncore/apps/opie-console/mainwindow.cpp | |
parent | ee753c0009da5bec4a71d3263e9623d04dddc5c4 (diff) | |
download | opie-3d27828732fe7e499219ad6e208dc13dead86431.zip opie-3d27828732fe7e499219ad6e208dc13dead86431.tar.gz opie-3d27828732fe7e499219ad6e208dc13dead86431.tar.bz2 |
Namespace changes for Apps
QAshMoney and Reader need to be valgrinded
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 197f799..06a8f7d 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -15,24 +15,25 @@ | |||
15 | #include "profileeditordialog.h" | 15 | #include "profileeditordialog.h" |
16 | #include "configdialog.h" | 16 | #include "configdialog.h" |
17 | #include "default.h" | 17 | #include "default.h" |
18 | #include "profilemanager.h" | 18 | #include "profilemanager.h" |
19 | #include "mainwindow.h" | 19 | #include "mainwindow.h" |
20 | #include "tabwidget.h" | 20 | #include "tabwidget.h" |
21 | #include "transferdialog.h" | 21 | #include "transferdialog.h" |
22 | #include "function_keyboard.h" | 22 | #include "function_keyboard.h" |
23 | #include "emulation_handler.h" | 23 | #include "emulation_handler.h" |
24 | #include "script.h" | 24 | #include "script.h" |
25 | 25 | ||
26 | 26 | ||
27 | using namespace Opie::Ui; | ||
27 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { | 28 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { |
28 | KeyTrans::loadAll(); | 29 | KeyTrans::loadAll(); |
29 | for (int i = 0; i < KeyTrans::count(); i++ ) { | 30 | for (int i = 0; i < KeyTrans::count(); i++ ) { |
30 | KeyTrans* s = KeyTrans::find(i ); | 31 | KeyTrans* s = KeyTrans::find(i ); |
31 | assert( s ); | 32 | assert( s ); |
32 | } | 33 | } |
33 | m_factory = new MetaFactory(); | 34 | m_factory = new MetaFactory(); |
34 | Default def(m_factory); | 35 | Default def(m_factory); |
35 | m_sessions.setAutoDelete( TRUE ); | 36 | m_sessions.setAutoDelete( TRUE ); |
36 | m_curSession = 0; | 37 | m_curSession = 0; |
37 | m_manager = new ProfileManager( m_factory ); | 38 | m_manager = new ProfileManager( m_factory ); |
38 | m_manager->load(); | 39 | m_manager->load(); |
@@ -323,25 +324,25 @@ void MainWindow::slotRecordScript() { | |||
323 | currentSession()->emulationHandler()->startRecording(); | 324 | currentSession()->emulationHandler()->startRecording(); |
324 | m_saveScript->setEnabled(true); | 325 | m_saveScript->setEnabled(true); |
325 | m_recordScript->setEnabled(false); | 326 | m_recordScript->setEnabled(false); |
326 | } | 327 | } |
327 | } | 328 | } |
328 | 329 | ||
329 | void MainWindow::slotSaveScript() { | 330 | void MainWindow::slotSaveScript() { |
330 | if (currentSession() && currentSession()->emulationHandler()->isRecording()) { | 331 | if (currentSession() && currentSession()->emulationHandler()->isRecording()) { |
331 | QMap<QString, QStringList> map; | 332 | QMap<QString, QStringList> map; |
332 | QStringList text; | 333 | QStringList text; |
333 | text << "text/plain"; | 334 | text << "text/plain"; |
334 | map.insert(tr("Script"), text ); | 335 | map.insert(tr("Script"), text ); |
335 | QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); | 336 | QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); |
336 | if (!filename.isEmpty()) { | 337 | if (!filename.isEmpty()) { |
337 | QFileInfo info(filename); | 338 | QFileInfo info(filename); |
338 | if (info.extension(FALSE) != "script") | 339 | if (info.extension(FALSE) != "script") |
339 | filename += ".script"; | 340 | filename += ".script"; |
340 | DocLnk nf; | 341 | DocLnk nf; |
341 | nf.setType("text/plain"); | 342 | nf.setType("text/plain"); |
342 | nf.setFile(filename); | 343 | nf.setFile(filename); |
343 | nf.setName(info.fileName()); | 344 | nf.setName(info.fileName()); |
344 | FileManager fm; | 345 | FileManager fm; |
345 | fm.saveFile(nf, currentSession()->emulationHandler()->script()->script()); | 346 | fm.saveFile(nf, currentSession()->emulationHandler()->script()->script()); |
346 | currentSession()->emulationHandler()->clearScript(); | 347 | currentSession()->emulationHandler()->clearScript(); |
347 | m_saveScript->setEnabled(false); | 348 | m_saveScript->setEnabled(false); |
@@ -696,25 +697,25 @@ void MainWindow::slotSaveSession() { | |||
696 | tr("<qt>There is no Connection.</qt>"), 1 ); | 697 | tr("<qt>There is no Connection.</qt>"), 1 ); |
697 | return; | 698 | return; |
698 | } | 699 | } |
699 | manager()->add( currentSession()->profile() ); | 700 | manager()->add( currentSession()->profile() ); |
700 | manager()->save(); | 701 | manager()->save(); |
701 | populateProfiles(); | 702 | populateProfiles(); |
702 | } | 703 | } |
703 | void MainWindow::slotSaveHistory() { | 704 | void MainWindow::slotSaveHistory() { |
704 | QMap<QString, QStringList> map; | 705 | QMap<QString, QStringList> map; |
705 | QStringList text; | 706 | QStringList text; |
706 | text << "text/plain"; | 707 | text << "text/plain"; |
707 | map.insert(tr("History"), text ); | 708 | map.insert(tr("History"), text ); |
708 | QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); | 709 | QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); |
709 | if (filename.isEmpty() ) return; | 710 | if (filename.isEmpty() ) return; |
710 | 711 | ||
711 | QFileInfo info(filename); | 712 | QFileInfo info(filename); |
712 | 713 | ||
713 | DocLnk nf; | 714 | DocLnk nf; |
714 | nf.setType("text/plain"); | 715 | nf.setType("text/plain"); |
715 | nf.setFile(filename); | 716 | nf.setFile(filename); |
716 | nf.setName(info.fileName()); | 717 | nf.setName(info.fileName()); |
717 | 718 | ||
718 | 719 | ||
719 | QFile file(filename); | 720 | QFile file(filename); |
720 | file.open(IO_WriteOnly ); | 721 | file.open(IO_WriteOnly ); |