summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/atconfigdialog.cpp1
-rw-r--r--noncore/apps/opie-console/keytrans.cpp3
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp1
3 files changed, 1 insertions, 4 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,40 +1,39 @@
1 1
2#include <qlineedit.h> 2#include <qlineedit.h>
3#include <qspinbox.h> 3#include <qspinbox.h>
4#include <qlayout.h> 4#include <qlayout.h>
5#include <qcombobox.h> 5#include <qcombobox.h>
6#include <qtabwidget.h> 6#include <qtabwidget.h>
7#include <qlabel.h> 7#include <qlabel.h>
8#include <qcombobox.h>
9#include <qscrollview.h> 8#include <qscrollview.h>
10 9
11#include "atconfigdialog.h" 10#include "atconfigdialog.h"
12#include "io_modem.h" 11#include "io_modem.h"
13 12
14 13
15ATConfigDialog::ATConfigDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 14ATConfigDialog::ATConfigDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
16 : QDialog( parent, name, modal, fl ) { 15 : QDialog( parent, name, modal, fl ) {
17 16
18 17
19 setCaption( tr( "Dialing parameter setup" ) ); 18 setCaption( tr( "Dialing parameter setup" ) );
20 19
21 QVBoxLayout *layout = new QVBoxLayout( this ); 20 QVBoxLayout *layout = new QVBoxLayout( this );
22 QTabWidget *tabWidget = new QTabWidget( this ); 21 QTabWidget *tabWidget = new QTabWidget( this );
23 22
24 tabWidget->addTab( tab0( this ), tr("Settings1") ); 23 tabWidget->addTab( tab0( this ), tr("Settings1") );
25 tabWidget->addTab( tab1( this ), tr("Settings2") ); 24 tabWidget->addTab( tab1( this ), tr("Settings2") );
26 25
27 layout->addWidget( tabWidget ); 26 layout->addWidget( tabWidget );
28 27
29} 28}
30 29
31QWidget* ATConfigDialog::tab0( QWidget* parent) { 30QWidget* ATConfigDialog::tab0( QWidget* parent) {
32 31
33 32
34 QScrollView* sv = new QScrollView( parent ); 33 QScrollView* sv = new QScrollView( parent );
35 34
36 QWidget *returnWidget = new QWidget( sv->viewport() ); 35 QWidget *returnWidget = new QWidget( sv->viewport() );
37 sv->setResizePolicy( QScrollView::AutoOneFit ); 36 sv->setResizePolicy( QScrollView::AutoOneFit );
38// sv->setHScrollBarMode( QScrollView::AlwaysOff ); 37// sv->setHScrollBarMode( QScrollView::AlwaysOff );
39// sv->setFrameShape( QFrame::NoFrame ); 38// sv->setFrameShape( QFrame::NoFrame );
40 39
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
@@ -384,65 +384,65 @@ Loop:
384//printf(" %02x(%c)",res.latin1()[i],res.latin1()[i]>=' '?res.latin1()[i]:'?'); 384//printf(" %02x(%c)",res.latin1()[i],res.latin1()[i]>=' '?res.latin1()[i]:'?');
385 } 385 }
386//printf(". summary %04x,%02x,%02x,%d\n",key,mode,mask,cmd); 386//printf(". summary %04x,%02x,%02x,%d\n",key,mode,mask,cmd);
387 KeyTrans::KeyEntry* ke = kt->addEntry(slinno,key,mode,mask,cmd,res); 387 KeyTrans::KeyEntry* ke = kt->addEntry(slinno,key,mode,mask,cmd,res);
388 if (ke) 388 if (ke)
389 { 389 {
390 fprintf(stderr,"%s(%d): keystroke already assigned in line %d.\n",path.ascii(),slinno,ke->ref); 390 fprintf(stderr,"%s(%d): keystroke already assigned in line %d.\n",path.ascii(),slinno,ke->ref);
391 } 391 }
392 getSymbol(); 392 getSymbol();
393 assertSyntax(sym == SYMEol, "Unexpected text") 393 assertSyntax(sym == SYMEol, "Unexpected text")
394 goto Loop; 394 goto Loop;
395 } 395 }
396 if (sym == SYMEol) 396 if (sym == SYMEol)
397 { 397 {
398 getSymbol(); 398 getSymbol();
399 goto Loop; 399 goto Loop;
400 } 400 }
401 401
402 assertSyntax(sym == SYMEof, "Undecodable Line") 402 assertSyntax(sym == SYMEof, "Undecodable Line")
403 403
404 buf->close(); 404 buf->close();
405 return; 405 return;
406 406
407ERROR: 407ERROR:
408 while (sym != SYMEol && sym != SYMEof) getSymbol(); // eoln 408 while (sym != SYMEol && sym != SYMEof) getSymbol(); // eoln
409 goto Loop; 409 goto Loop;
410} 410}
411 411
412 412
413KeyTrans* KeyTrans::defaultKeyTrans() 413KeyTrans* KeyTrans::defaultKeyTrans()
414{ 414{
415 QCString txt = 415 QCString txt =
416#include "default.keytab.h" 416 #include "default.keytab.h"
417 ; 417 ;
418 QBuffer buf(txt); 418 QBuffer buf(txt);
419 return fromDevice("[buildin]",buf); 419 return fromDevice("[buildin]",buf);
420} 420}
421 421
422KeyTrans* KeyTrans::fromFile(const char* path) 422KeyTrans* KeyTrans::fromFile(const char* path)
423{ 423{
424 QFile file(path); 424 QFile file(path);
425 return fromDevice(path,file); 425 return fromDevice(path,file);
426} 426}
427 427
428// local symbol tables --------------------------------------------------------------------- 428// local symbol tables ---------------------------------------------------------------------
429// material needed for parsing the config file. 429// material needed for parsing the config file.
430// This is incomplete work. 430// This is incomplete work.
431 431
432void KeyTransSymbols::defKeySym(const char* key, int val) 432void KeyTransSymbols::defKeySym(const char* key, int val)
433{ 433{
434 keysyms.insert(key,(QObject*)(val+1)); 434 keysyms.insert(key,(QObject*)(val+1));
435} 435}
436 436
437void KeyTransSymbols::defOprSym(const char* key, int val) 437void KeyTransSymbols::defOprSym(const char* key, int val)
438{ 438{
439 oprsyms.insert(key,(QObject*)(val+1)); 439 oprsyms.insert(key,(QObject*)(val+1));
440} 440}
441 441
442void KeyTransSymbols::defModSym(const char* key, int val) 442void KeyTransSymbols::defModSym(const char* key, int val)
443{ 443{
444 modsyms.insert(key,(QObject*)(val+1)); 444 modsyms.insert(key,(QObject*)(val+1));
445} 445}
446 446
447void KeyTransSymbols::defOprSyms() 447void KeyTransSymbols::defOprSyms()
448{ 448{
@@ -668,39 +668,38 @@ void KeyTrans::loadAll()
668 for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { 668 for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
669 QFile file(path + "/" + *it); 669 QFile file(path + "/" + *it);
670 KeyTrans* sc = KeyTrans::fromDevice(*it, file); 670 KeyTrans* sc = KeyTrans::fromDevice(*it, file);
671 if (sc) { 671 if (sc) {
672 sc->addKeyTrans(); 672 sc->addKeyTrans();
673 } 673 }
674 } 674 }
675 675
676} 676}
677 677
678// Debugging material ----------------------------------------------------------- 678// Debugging material -----------------------------------------------------------
679/* 679/*
680void TestTokenizer(QBuffer &buf) 680void TestTokenizer(QBuffer &buf)
681{ 681{
682 // opening sequence 682 // opening sequence
683 683
684 buf.open(IO_ReadOnly); 684 buf.open(IO_ReadOnly);
685 cc = buf.getch(); 685 cc = buf.getch();
686 lineno = 1; 686 lineno = 1;
687 687
688 // Test tokenizer 688 // Test tokenizer
689 689
690 while (getSymbol(buf)) ReportToken(); 690 while (getSymbol(buf)) ReportToken();
691 691
692 buf.close(); 692 buf.close();
693} 693}
694 694
695void test() 695void test()
696{ 696{
697 // Opening sequence 697 // Opening sequence
698 698
699 QCString txt = 699 QCString txt =
700#include "default.keytab.h"
701 ; 700 ;
702 QBuffer buf(txt); 701 QBuffer buf(txt);
703 if (0) TestTokenizer(buf); 702 if (0) TestTokenizer(buf);
704 if (1) { KeyTrans kt; kt.scanTable(buf); } 703 if (1) { KeyTrans kt; kt.scanTable(buf); }
705} 704}
706*/ 705*/
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,43 +1,42 @@
1#include <assert.h> 1#include <assert.h>
2 2
3#include <qaction.h> 3#include <qaction.h>
4#include <qmenubar.h> 4#include <qmenubar.h>
5#include <qtoolbar.h> 5#include <qtoolbar.h>
6#include <qmessagebox.h> 6#include <qmessagebox.h>
7#include <qwhatsthis.h> 7#include <qwhatsthis.h>
8#include <qfileinfo.h> 8#include <qfileinfo.h>
9 9
10#include <qpe/filemanager.h> 10#include <qpe/filemanager.h>
11#include <qpe/qpeapplication.h>
12 11
13#include <opie2/ofiledialog.h> 12#include <opie2/ofiledialog.h>
14 13
15#include "TEmulation.h" 14#include "TEmulation.h"
16#include "profileeditordialog.h" 15#include "profileeditordialog.h"
17#include "configdialog.h" 16#include "configdialog.h"
18#include "default.h" 17#include "default.h"
19#include "profilemanager.h" 18#include "profilemanager.h"
20#include "mainwindow.h" 19#include "mainwindow.h"
21#include "tabwidget.h" 20#include "tabwidget.h"
22#include "transferdialog.h" 21#include "transferdialog.h"
23#include "function_keyboard.h" 22#include "function_keyboard.h"
24#include "emulation_handler.h" 23#include "emulation_handler.h"
25#include "script.h" 24#include "script.h"
26 25
27 26
28MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 27MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
29 KeyTrans::loadAll(); 28 KeyTrans::loadAll();
30 for (int i = 0; i < KeyTrans::count(); i++ ) { 29 for (int i = 0; i < KeyTrans::count(); i++ ) {
31 KeyTrans* s = KeyTrans::find(i ); 30 KeyTrans* s = KeyTrans::find(i );
32 assert( s ); 31 assert( s );
33 } 32 }
34 m_factory = new MetaFactory(); 33 m_factory = new MetaFactory();
35 Default def(m_factory); 34 Default def(m_factory);
36 m_sessions.setAutoDelete( TRUE ); 35 m_sessions.setAutoDelete( TRUE );
37 m_curSession = 0; 36 m_curSession = 0;
38 m_manager = new ProfileManager( m_factory ); 37 m_manager = new ProfileManager( m_factory );
39 m_manager->load(); 38 m_manager->load();
40 m_scriptsData.setAutoDelete(TRUE); 39 m_scriptsData.setAutoDelete(TRUE);
41 40
42 initUI(); 41 initUI();
43 populateProfiles(); 42 populateProfiles();