author | chicken <chicken> | 2004-03-01 19:15:57 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 19:15:57 (UTC) |
commit | fb0981f47e529f9d1dd77fa005ffa3c3ecedff67 (patch) (side-by-side diff) | |
tree | c338eb54935bbbe8966d5a642303d4aae3c1f0c8 | |
parent | b5a544bf520ce6d0d8f7b314720e6a703079dc1d (diff) | |
download | opie-fb0981f47e529f9d1dd77fa005ffa3c3ecedff67.zip opie-fb0981f47e529f9d1dd77fa005ffa3c3ecedff67.tar.gz opie-fb0981f47e529f9d1dd77fa005ffa3c3ecedff67.tar.bz2 |
fix includes
-rw-r--r-- | noncore/apps/opie-console/atconfigdialog.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/keytrans.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/atconfigdialog.cpp b/noncore/apps/opie-console/atconfigdialog.cpp index e683ab3..8e91b9e 100644 --- a/noncore/apps/opie-console/atconfigdialog.cpp +++ b/noncore/apps/opie-console/atconfigdialog.cpp @@ -1,104 +1,103 @@ #include <qlineedit.h> #include <qspinbox.h> #include <qlayout.h> #include <qcombobox.h> #include <qtabwidget.h> #include <qlabel.h> -#include <qcombobox.h> #include <qscrollview.h> #include "atconfigdialog.h" #include "io_modem.h" ATConfigDialog::ATConfigDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { setCaption( tr( "Dialing parameter setup" ) ); QVBoxLayout *layout = new QVBoxLayout( this ); QTabWidget *tabWidget = new QTabWidget( this ); tabWidget->addTab( tab0( this ), tr("Settings1") ); tabWidget->addTab( tab1( this ), tr("Settings2") ); layout->addWidget( tabWidget ); } QWidget* ATConfigDialog::tab0( QWidget* parent) { QScrollView* sv = new QScrollView( parent ); QWidget *returnWidget = new QWidget( sv->viewport() ); sv->setResizePolicy( QScrollView::AutoOneFit ); // sv->setHScrollBarMode( QScrollView::AlwaysOff ); // sv->setFrameShape( QFrame::NoFrame ); QGridLayout *layout = new QGridLayout( returnWidget, 10, 2 ); QLabel *initStringLabel = new QLabel( tr("Init string "), returnWidget ); initStringLine = new QLineEdit( returnWidget ); layout->addWidget( initStringLabel, 0, 0 ); layout->addWidget( initStringLine, 0, 1 ); QLabel *resetStringLabel = new QLabel( tr("Reset string "), returnWidget ); resetStringLine = new QLineEdit( returnWidget ); layout->addWidget( resetStringLabel, 1, 0 ); layout->addWidget( resetStringLine, 1, 1 ); QLabel *dialPref1Label = new QLabel( tr("Dialing prefix #1 " ), returnWidget ); dialPref1Line = new QLineEdit( returnWidget ); layout->addWidget( dialPref1Label, 2, 0 ); layout->addWidget( dialPref1Line, 2, 1 ); QLabel *dialSuf1Label = new QLabel( tr("Dialing suffix #1 " ), returnWidget ); dialSuf1Line = new QLineEdit( returnWidget ); layout->addWidget( dialSuf1Label, 3, 0 ); layout->addWidget( dialSuf1Line, 3, 1 ); QLabel *dialPref2Label = new QLabel( tr("Dialing prefix #2 " ), returnWidget ); dialPref2Line = new QLineEdit( returnWidget ); layout->addWidget( dialPref2Label, 4, 0 ); layout->addWidget( dialPref2Line, 4, 1 ); QLabel *dialSuf2Label = new QLabel( tr("Dialing suffix #2 " ), returnWidget ); dialSuf2Line = new QLineEdit( returnWidget ); layout->addWidget( dialSuf2Label, 5, 0 ); layout->addWidget( dialSuf2Line, 5, 1 ); QLabel *dialPref3Label = new QLabel( tr("Dialing prefix #3 " ), returnWidget ); dialPref3Line = new QLineEdit( returnWidget ); layout->addWidget( dialPref3Label, 6, 0 ); layout->addWidget( dialPref3Line, 6, 1 ); QLabel *dialSuf3Label = new QLabel( tr("Dialing suffix #3 " ), returnWidget ); dialSuf3Line = new QLineEdit( returnWidget ); layout->addWidget( dialSuf3Label, 7, 0 ); layout->addWidget( dialSuf3Line, 7, 1 ); QLabel *connectLabel = new QLabel( tr("Connect string " ), returnWidget ); connectLine = new QLineEdit( returnWidget ); layout->addWidget( connectLabel, 8, 0 ); layout->addWidget( connectLine, 8, 1 ); QLabel *hangupLabel = new QLabel( tr("Hang-up string " ), returnWidget ); hangupLine = new QLineEdit( returnWidget ); layout->addWidget( hangupLabel, 9, 0 ); layout->addWidget( hangupLine, 9, 1 ); sv->addChild( returnWidget ); return sv; } QWidget* ATConfigDialog::tab1( QWidget* parent ) { diff --git a/noncore/apps/opie-console/keytrans.cpp b/noncore/apps/opie-console/keytrans.cpp index d569ae0..45a7960 100644 --- a/noncore/apps/opie-console/keytrans.cpp +++ b/noncore/apps/opie-console/keytrans.cpp @@ -604,103 +604,102 @@ void KeyTransSymbols::defKeySyms() defKeySym("BracketRight", Qt::Key_BracketRight); defKeySym("AsciiCircum", Qt::Key_AsciiCircum ); defKeySym("Underscore", Qt::Key_Underscore ); defKeySym("QuoteLeft", Qt::Key_QuoteLeft ); defKeySym("BraceLeft", Qt::Key_BraceLeft ); defKeySym("Bar", Qt::Key_Bar ); defKeySym("BraceRight", Qt::Key_BraceRight ); defKeySym("AsciiTilde", Qt::Key_AsciiTilde ); } KeyTransSymbols::KeyTransSymbols() { defModSyms(); defOprSyms(); defKeySyms(); } // Global material ----------------------------------------------------------- static int keytab_serial = 0; //FIXME: remove,localize static QIntDict<KeyTrans> * numb2keymap = 0L; static QDict<KeyTrans> * path2keymap = 0L; KeyTrans* KeyTrans::find(int numb) { KeyTrans* res = numb2keymap->find(numb); return res ? res : numb2keymap->find(0); } KeyTrans* KeyTrans::find(const char* path) { KeyTrans* res = path2keymap->find(path); return res ? res : numb2keymap->find(0); } int KeyTrans::count() { return numb2keymap->count(); } void KeyTrans::addKeyTrans() { this->numb = keytab_serial ++; numb2keymap->insert(numb,this); path2keymap->insert(path,this); } void KeyTrans::loadAll() { if (!numb2keymap) numb2keymap = new QIntDict<KeyTrans>; if (!path2keymap) path2keymap = new QDict<KeyTrans>; if (!syms) syms = new KeyTransSymbols; defaultKeyTrans()->addKeyTrans(); QString path = QPEApplication::qpeDir() + "etc/keytabs"; QDir dir(path); QStringList lst = dir.entryList("*.keytab"); for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { QFile file(path + "/" + *it); KeyTrans* sc = KeyTrans::fromDevice(*it, file); if (sc) { sc->addKeyTrans(); } } } // Debugging material ----------------------------------------------------------- /* void TestTokenizer(QBuffer &buf) { // opening sequence buf.open(IO_ReadOnly); cc = buf.getch(); lineno = 1; // Test tokenizer while (getSymbol(buf)) ReportToken(); buf.close(); } void test() { // Opening sequence QCString txt = -#include "default.keytab.h" ; QBuffer buf(txt); if (0) TestTokenizer(buf); if (1) { KeyTrans kt; kt.scanTable(buf); } } */ diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 0a475d8..1d2385f 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -1,107 +1,106 @@ #include <assert.h> #include <qaction.h> #include <qmenubar.h> #include <qtoolbar.h> #include <qmessagebox.h> #include <qwhatsthis.h> #include <qfileinfo.h> #include <qpe/filemanager.h> -#include <qpe/qpeapplication.h> #include <opie2/ofiledialog.h> #include "TEmulation.h" #include "profileeditordialog.h" #include "configdialog.h" #include "default.h" #include "profilemanager.h" #include "mainwindow.h" #include "tabwidget.h" #include "transferdialog.h" #include "function_keyboard.h" #include "emulation_handler.h" #include "script.h" MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { KeyTrans::loadAll(); for (int i = 0; i < KeyTrans::count(); i++ ) { KeyTrans* s = KeyTrans::find(i ); assert( s ); } m_factory = new MetaFactory(); Default def(m_factory); m_sessions.setAutoDelete( TRUE ); m_curSession = 0; m_manager = new ProfileManager( m_factory ); m_manager->load(); m_scriptsData.setAutoDelete(TRUE); initUI(); populateProfiles(); populateScripts(); } void MainWindow::initUI() { setToolBarsMovable( FALSE ); /* tool bar for the menu */ m_tool = new QToolBar( this ); m_tool->setHorizontalStretchable( TRUE ); m_bar = new QMenuBar( m_tool ); m_console = new QPopupMenu( this ); m_scripts = new QPopupMenu( this ); m_sessionsPop= new QPopupMenu( this ); m_scriptsPop = new QPopupMenu( this ); /* add a toolbar for icons */ m_icons = new QToolBar(this); /* * the settings action */ m_setProfiles = new QAction(tr("Configure Profiles"), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0); m_setProfiles->addTo( m_console ); connect( m_setProfiles, SIGNAL(activated() ), this, SLOT(slotConfigure() ) ); m_console->insertSeparator(); /* * new Action for new sessions */ QAction* newCon = new QAction(tr("New Profile"), Resource::loadPixmap( "new" ), QString::null, 0, this, 0); newCon->addTo( m_console ); connect( newCon, SIGNAL(activated() ), this, SLOT(slotNew() ) ); m_console->insertSeparator(); QAction *saveCon = new QAction( tr("Save Profile" ), Resource::loadPixmap( "save" ), QString::null, 0, this, 0 ); saveCon->addTo( m_console ); connect( saveCon, SIGNAL(activated() ), this, SLOT(slotSaveSession() ) ); m_console->insertSeparator(); /* * connect action */ m_connect = new QAction( tr("Connect"), Resource::loadPixmap("console/connected"), QString::null, 0, this, 0 ); m_connect->addTo( m_console ); connect(m_connect, SIGNAL(activated() ), this, SLOT(slotConnect() ) ); /* * disconnect action */ m_disconnect = new QAction( tr("Disconnect"), Resource::loadPixmap("console/notconnected"), |