author | imm <imm> | 2002-09-01 14:34:26 (UTC) |
---|---|---|
committer | imm <imm> | 2002-09-01 14:34:26 (UTC) |
commit | 09c844dbf402d76f58b01397e850bd5c17c0535b (patch) (unidiff) | |
tree | c3f518bb7fd9a241f4b139146d0d2c89b2140b71 | |
parent | 90d1c76275ab950d96cda2a2f65dab1bbcc50a40 (diff) | |
download | opie-09c844dbf402d76f58b01397e850bd5c17c0535b.zip opie-09c844dbf402d76f58b01397e850bd5c17c0535b.tar.gz opie-09c844dbf402d76f58b01397e850bd5c17c0535b.tar.bz2 |
config fix
-rw-r--r-- | noncore/comm/keypebble/krfboptions.cpp | 48 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfboptions.h | 4 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvnc.cpp | 1 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncoptionsdlg.cpp | 1 | ||||
-rw-r--r-- | noncore/comm/keypebble/main.cpp | 1 |
5 files changed, 29 insertions, 26 deletions
diff --git a/noncore/comm/keypebble/krfboptions.cpp b/noncore/comm/keypebble/krfboptions.cpp index 9daf3f0..8c4320b 100644 --- a/noncore/comm/keypebble/krfboptions.cpp +++ b/noncore/comm/keypebble/krfboptions.cpp | |||
@@ -1,52 +1,56 @@ | |||
1 | #include <qpe/config.h> | 1 | #include <qpe/config.h> |
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include "krfboptions.h" | 3 | #include "krfboptions.h" |
4 | 4 | ||
5 | KRFBOptions::KRFBOptions() | 5 | KRFBOptions::KRFBOptions() |
6 | { | 6 | { |
7 | Config config( "keypebble" ); | 7 | readSettings(); |
8 | readSettings( &config ); | ||
9 | } | 8 | } |
10 | 9 | ||
11 | KRFBOptions::~KRFBOptions() | 10 | KRFBOptions::~KRFBOptions() |
12 | { | 11 | { |
13 | Config config( "keypebble" ); | 12 | writeSettings(); |
14 | writeSettings( &config ); | ||
15 | } | 13 | } |
16 | 14 | ||
17 | void KRFBOptions::readSettings( Config *config ) | 15 | void KRFBOptions::readSettings() |
18 | { | 16 | { |
19 | hexTile = config->readBoolEntry( "HexTile" ); | 17 | Config config( "keypebble" ); |
20 | corre = config->readBoolEntry( "CORRE" ); | 18 | config.setGroup("Settings"); |
21 | rre = config->readBoolEntry( "RRE" ); | 19 | hexTile = config.readBoolEntry( "HexTile", 0 ); |
22 | copyrect = config->readBoolEntry( "CopyRect", true ); | 20 | corre = config.readBoolEntry( "CORRE", 0 ); |
23 | colors256 = config->readBoolEntry( "Colors256" ); | 21 | rre = config.readBoolEntry( "RRE", 0 ); |
24 | shared = config->readBoolEntry( "Shared" ); | 22 | copyrect = config.readBoolEntry( "CopyRect", 1 ); |
25 | readOnly = config->readBoolEntry( "ReadOnly" ); | 23 | colors256 = config.readBoolEntry( "Colors256", 0 ); |
26 | updateRate = config->readNumEntry( "UpdateRate", 50 ); | 24 | shared = config.readBoolEntry( "Shared", 0 ); |
25 | readOnly = config.readBoolEntry( "ReadOnly", 0 ); | ||
26 | updateRate = config.readNumEntry( "UpdateRate", 50 ); | ||
27 | deIconify = config.readBoolEntry( "DeIconify", 0 ); | ||
27 | } | 28 | } |
28 | 29 | ||
29 | void KRFBOptions::writeSettings( Config *config ) | 30 | void KRFBOptions::writeSettings() |
30 | { | 31 | { |
31 | config->writeEntry( "HexTile", hexTile ); | 32 | Config config( "keypebble" ); |
32 | config->writeEntry( "CORRE", corre ); | 33 | config.setGroup("Settings"); |
33 | config->writeEntry( "RRE", rre ); | 34 | config.writeEntry( "HexTile", hexTile ); |
34 | config->writeEntry( "CopyRect", copyrect ); | 35 | config.writeEntry( "CORRE", corre ); |
35 | config->writeEntry( "Colors256", colors256 ); | 36 | config.writeEntry( "RRE", rre ); |
36 | config->writeEntry( "Shared", shared ); | 37 | config.writeEntry( "CopyRect", copyrect ); |
37 | config->writeEntry( "ReadOnly", readOnly ); | 38 | config.writeEntry( "Colors256", colors256 ); |
38 | config->writeEntry( "UpdateRate", updateRate ); | 39 | config.writeEntry( "Shared", shared ); |
40 | config.writeEntry( "ReadOnly", readOnly ); | ||
41 | config.writeEntry( "UpdateRate", updateRate ); | ||
42 | config.writeEntry( "DeIconify", deIconify ); | ||
39 | } | 43 | } |
40 | 44 | ||
41 | int KRFBOptions::encodings() | 45 | int KRFBOptions::encodings() |
42 | { | 46 | { |
43 | // Initially one because we always support raw encoding | 47 | // Initially one because we always support raw encoding |
44 | int count = 1; | 48 | int count = 1; |
45 | 49 | ||
46 | count += hexTile ? 1 : 0; | 50 | count += hexTile ? 1 : 0; |
47 | count += corre ? 1 : 0; | 51 | count += corre ? 1 : 0; |
48 | count += rre ? 1 : 0; | 52 | count += rre ? 1 : 0; |
49 | count += copyrect ? 1 : 0; | 53 | count += copyrect ? 1 : 0; |
50 | 54 | ||
51 | return count; | 55 | return count; |
52 | } | 56 | } |
diff --git a/noncore/comm/keypebble/krfboptions.h b/noncore/comm/keypebble/krfboptions.h index 41cea35..fd2b65c 100644 --- a/noncore/comm/keypebble/krfboptions.h +++ b/noncore/comm/keypebble/krfboptions.h | |||
@@ -1,31 +1,31 @@ | |||
1 | // -*- c++ -*- | 1 | // -*- c++ -*- |
2 | 2 | ||
3 | #ifndef KRFBOPTIONS_H | 3 | #ifndef KRFBOPTIONS_H |
4 | #define KRFBOPTIONS_H | 4 | #define KRFBOPTIONS_H |
5 | 5 | ||
6 | class Config; | 6 | class Config; |
7 | 7 | ||
8 | class KRFBOptions | 8 | class KRFBOptions |
9 | { | 9 | { |
10 | public: | 10 | public: |
11 | KRFBOptions(); | 11 | KRFBOptions(); |
12 | ~KRFBOptions(); | 12 | ~KRFBOptions(); |
13 | 13 | ||
14 | int encodings(); | 14 | int encodings(); |
15 | void readSettings( Config *config ); | 15 | void readSettings(); |
16 | void writeSettings( Config *config ); | 16 | void writeSettings(); |
17 | 17 | ||
18 | bool hexTile; | 18 | bool hexTile; |
19 | bool corre; | 19 | bool corre; |
20 | bool rre; | 20 | bool rre; |
21 | bool copyrect; | 21 | bool copyrect; |
22 | 22 | ||
23 | bool colors256; | 23 | bool colors256; |
24 | bool shared; | 24 | bool shared; |
25 | bool readOnly; | 25 | bool readOnly; |
26 | bool deIconify; | 26 | bool deIconify; |
27 | 27 | ||
28 | int updateRate; | 28 | int updateRate; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | #endif // KRFBOPTIONS_H | 31 | #endif // KRFBOPTIONS_H |
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp index bb18999..43cffc5 100644 --- a/noncore/comm/keypebble/kvnc.cpp +++ b/noncore/comm/keypebble/kvnc.cpp | |||
@@ -1,191 +1,190 @@ | |||
1 | #include <qiconset.h> | 1 | #include <qiconset.h> |
2 | #include <qdialog.h> | 2 | #include <qdialog.h> |
3 | #include <qpixmap.h> | 3 | #include <qpixmap.h> |
4 | #include <qdom.h> | 4 | #include <qdom.h> |
5 | #include <qaction.h> | 5 | #include <qaction.h> |
6 | #include <qpe/qpemenubar.h> | 6 | #include <qpe/qpemenubar.h> |
7 | #include <qstatusbar.h> | 7 | #include <qstatusbar.h> |
8 | #include <qpopupmenu.h> | 8 | #include <qpopupmenu.h> |
9 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
10 | #include <qpe/qpetoolbar.h> | 10 | #include <qpe/qpetoolbar.h> |
11 | #include <qtimer.h> | 11 | #include <qtimer.h> |
12 | #include <qmessagebox.h> | 12 | #include <qmessagebox.h> |
13 | #include <qpe/qpeapplication.h> | 13 | #include <qpe/qpeapplication.h> |
14 | #include <qpe/global.h> | 14 | #include <qpe/global.h> |
15 | #include <assert.h> | 15 | #include <assert.h> |
16 | 16 | ||
17 | #include "kvnc.h" | 17 | #include "kvnc.h" |
18 | #include "krfbcanvas.h" | 18 | #include "krfbcanvas.h" |
19 | #include "kvncoptionsdlg.h" | 19 | #include "kvncoptionsdlg.h" |
20 | #include "krfbconnection.h" | 20 | #include "krfbconnection.h" |
21 | 21 | ||
22 | 22 | ||
23 | /* XPM */ | 23 | /* XPM */ |
24 | static char * menu_xpm[] = { | 24 | static char * menu_xpm[] = { |
25 | "12 12 5 1", | 25 | "12 12 5 1", |
26 | " c None", | 26 | " c None", |
27 | ".c #000000", | 27 | ".c #000000", |
28 | "+c #FFFDAD", | 28 | "+c #FFFDAD", |
29 | "@c #FFFF00", | 29 | "@c #FFFF00", |
30 | "#c #E5E100", | 30 | "#c #E5E100", |
31 | " ", | 31 | " ", |
32 | " ", | 32 | " ", |
33 | " ......... ", | 33 | " ......... ", |
34 | " .+++++++. ", | 34 | " .+++++++. ", |
35 | " .+@@@@#. ", | 35 | " .+@@@@#. ", |
36 | " .+@@@#. ", | 36 | " .+@@@#. ", |
37 | " .+@@#. ", | 37 | " .+@@#. ", |
38 | " .+@#. ", | 38 | " .+@#. ", |
39 | " .+#. ", | 39 | " .+#. ", |
40 | " .+. ", | 40 | " .+. ", |
41 | " .. ", | 41 | " .. ", |
42 | " "}; | 42 | " "}; |
43 | 43 | ||
44 | const int StatusTextId = 0; | 44 | const int StatusTextId = 0; |
45 | 45 | ||
46 | KVNC::KVNC( const char *name ) : QMainWindow( 0, name ) | 46 | KVNC::KVNC( const char *name ) : QMainWindow( 0, name ) |
47 | { | 47 | { |
48 | setCaption( tr("VNC Viewer") ); | 48 | setCaption( tr("VNC Viewer") ); |
49 | fullscreen = false; | 49 | fullscreen = false; |
50 | 50 | ||
51 | canvas = new KRFBCanvas( this, "canvas" ); | 51 | canvas = new KRFBCanvas( this, "canvas" ); |
52 | setCentralWidget( canvas ); | 52 | setCentralWidget( canvas ); |
53 | 53 | ||
54 | connect( canvas->connection(), SIGNAL(statusChanged(const QString &)), | 54 | connect( canvas->connection(), SIGNAL(statusChanged(const QString &)), |
55 | this, SLOT(statusMessage(const QString &)) ); | 55 | this, SLOT(statusMessage(const QString &)) ); |
56 | connect( canvas->connection(), SIGNAL(error(const QString &)), | 56 | connect( canvas->connection(), SIGNAL(error(const QString &)), |
57 | this, SLOT(error(const QString &)) ); | 57 | this, SLOT(error(const QString &)) ); |
58 | connect( canvas->connection(), SIGNAL(connected()), this, SLOT(connected()) ); | 58 | connect( canvas->connection(), SIGNAL(connected()), this, SLOT(connected()) ); |
59 | connect( canvas->connection(), SIGNAL(loggedIn()), this, SLOT(loggedIn()) ); | 59 | connect( canvas->connection(), SIGNAL(loggedIn()), this, SLOT(loggedIn()) ); |
60 | connect( canvas->connection(), SIGNAL(disconnected()), this, SLOT(disconnected()) ); | 60 | connect( canvas->connection(), SIGNAL(disconnected()), this, SLOT(disconnected()) ); |
61 | 61 | ||
62 | setupActions(); | 62 | setupActions(); |
63 | 63 | ||
64 | cornerButton = new QPushButton( this ); | 64 | cornerButton = new QPushButton( this ); |
65 | cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); | 65 | cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); |
66 | connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) ); | 66 | connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) ); |
67 | canvas->setCornerWidget( cornerButton ); | 67 | canvas->setCornerWidget( cornerButton ); |
68 | 68 | ||
69 | QTimer::singleShot( 0, canvas, SLOT(openConnection()) ); | 69 | QTimer::singleShot( 0, canvas, SLOT(openConnection()) ); |
70 | } | 70 | } |
71 | 71 | ||
72 | KVNC::~KVNC() | 72 | KVNC::~KVNC() |
73 | { | 73 | { |
74 | |||
75 | } | 74 | } |
76 | 75 | ||
77 | void KVNC::openURL( const QUrl &url ) | 76 | void KVNC::openURL( const QUrl &url ) |
78 | { | 77 | { |
79 | canvas->openURL( url ); | 78 | canvas->openURL( url ); |
80 | } | 79 | } |
81 | 80 | ||
82 | void KVNC::setupActions() | 81 | void KVNC::setupActions() |
83 | { | 82 | { |
84 | cornerMenu = new QPopupMenu( this ); | 83 | cornerMenu = new QPopupMenu( this ); |
85 | 84 | ||
86 | fullScreenAction = new QAction( tr("Full Screen"), QString::null, 0, 0 ); | 85 | fullScreenAction = new QAction( tr("Full Screen"), QString::null, 0, 0 ); |
87 | connect( fullScreenAction, SIGNAL(activated()), | 86 | connect( fullScreenAction, SIGNAL(activated()), |
88 | this, SLOT( toggleFullScreen() ) ); | 87 | this, SLOT( toggleFullScreen() ) ); |
89 | fullScreenAction->addTo( cornerMenu ); | 88 | fullScreenAction->addTo( cornerMenu ); |
90 | fullScreenAction->setEnabled( false ); | 89 | fullScreenAction->setEnabled( false ); |
91 | 90 | ||
92 | optionsAction = new QAction( tr("Settings"), QString::null, 0, 0 ); | 91 | optionsAction = new QAction( tr("Settings"), QString::null, 0, 0 ); |
93 | connect( optionsAction, SIGNAL(activated()), this, SLOT( showOptions() ) ); | 92 | connect( optionsAction, SIGNAL(activated()), this, SLOT( showOptions() ) ); |
94 | optionsAction->addTo( cornerMenu ); | 93 | optionsAction->addTo( cornerMenu ); |
95 | 94 | ||
96 | connectAction = new QAction( tr("Connect..."), QString::null, 0, 0 ); | 95 | connectAction = new QAction( tr("Connect..."), QString::null, 0, 0 ); |
97 | connect( connectAction, SIGNAL(activated()), | 96 | connect( connectAction, SIGNAL(activated()), |
98 | canvas, SLOT( openConnection() ) ); | 97 | canvas, SLOT( openConnection() ) ); |
99 | connectAction->addTo( cornerMenu ); | 98 | connectAction->addTo( cornerMenu ); |
100 | 99 | ||
101 | disconnectAction = new QAction( tr("Disconnect"), QString::null, 0, 0 ); | 100 | disconnectAction = new QAction( tr("Disconnect"), QString::null, 0, 0 ); |
102 | connect( disconnectAction, SIGNAL(activated()), | 101 | connect( disconnectAction, SIGNAL(activated()), |
103 | this, SLOT( closeConnection() ) ); | 102 | this, SLOT( closeConnection() ) ); |
104 | disconnectAction->addTo( cornerMenu ); | 103 | disconnectAction->addTo( cornerMenu ); |
105 | disconnectAction->setEnabled( false ); | 104 | disconnectAction->setEnabled( false ); |
106 | } | 105 | } |
107 | 106 | ||
108 | void KVNC::toggleFullScreen() | 107 | void KVNC::toggleFullScreen() |
109 | { | 108 | { |
110 | if ( fullscreen ) { | 109 | if ( fullscreen ) { |
111 | canvas->releaseKeyboard(); | 110 | canvas->releaseKeyboard(); |
112 | canvas->reparent( this, 0, QPoint(0,0), false ); | 111 | canvas->reparent( this, 0, QPoint(0,0), false ); |
113 | canvas->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 112 | canvas->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
114 | setCentralWidget( canvas ); | 113 | setCentralWidget( canvas ); |
115 | canvas->show(); | 114 | canvas->show(); |
116 | fullScreenAction->setText( tr("Full Screen") ); | 115 | fullScreenAction->setText( tr("Full Screen") ); |
117 | } else { | 116 | } else { |
118 | canvas->setFrameStyle( QFrame::NoFrame ); | 117 | canvas->setFrameStyle( QFrame::NoFrame ); |
119 | canvas->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop, | 118 | canvas->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop, |
120 | QPoint(0,0),false); | 119 | QPoint(0,0),false); |
121 | canvas->resize(qApp->desktop()->width(), qApp->desktop()->height()); | 120 | canvas->resize(qApp->desktop()->width(), qApp->desktop()->height()); |
122 | canvas->raise(); | 121 | canvas->raise(); |
123 | canvas->setFocus(); | 122 | canvas->setFocus(); |
124 | canvas->grabKeyboard(); | 123 | canvas->grabKeyboard(); |
125 | canvas->show(); | 124 | canvas->show(); |
126 | 125 | ||
127 | fullScreenAction->setText( tr("Stop Full Screen") ); | 126 | fullScreenAction->setText( tr("Stop Full Screen") ); |
128 | } | 127 | } |
129 | 128 | ||
130 | fullscreen = !fullscreen; | 129 | fullscreen = !fullscreen; |
131 | } | 130 | } |
132 | 131 | ||
133 | void KVNC::closeConnection() | 132 | void KVNC::closeConnection() |
134 | { | 133 | { |
135 | if ( fullscreen ) | 134 | if ( fullscreen ) |
136 | toggleFullScreen(); | 135 | toggleFullScreen(); |
137 | canvas->closeConnection(); | 136 | canvas->closeConnection(); |
138 | } | 137 | } |
139 | 138 | ||
140 | void KVNC::showMenu() | 139 | void KVNC::showMenu() |
141 | { | 140 | { |
142 | QPoint pt = mapToGlobal(cornerButton->pos()); | 141 | QPoint pt = mapToGlobal(cornerButton->pos()); |
143 | QSize s = cornerMenu->sizeHint(); | 142 | QSize s = cornerMenu->sizeHint(); |
144 | pt.ry() -= s.height(); | 143 | pt.ry() -= s.height(); |
145 | pt.rx() -= s.width(); | 144 | pt.rx() -= s.width(); |
146 | cornerMenu->popup( pt ); | 145 | cornerMenu->popup( pt ); |
147 | } | 146 | } |
148 | 147 | ||
149 | void KVNC::connected() | 148 | void KVNC::connected() |
150 | { | 149 | { |
151 | static QString msg = tr( "Connected to remote host" ); | 150 | static QString msg = tr( "Connected to remote host" ); |
152 | statusMessage( msg ); | 151 | statusMessage( msg ); |
153 | connectAction->setEnabled( false ); | 152 | connectAction->setEnabled( false ); |
154 | disconnectAction->setEnabled( true ); | 153 | disconnectAction->setEnabled( true ); |
155 | fullScreenAction->setEnabled( true ); | 154 | fullScreenAction->setEnabled( true ); |
156 | } | 155 | } |
157 | 156 | ||
158 | void KVNC::loggedIn() | 157 | void KVNC::loggedIn() |
159 | { | 158 | { |
160 | static QString msg = tr( "Logged in to remote host" ); | 159 | static QString msg = tr( "Logged in to remote host" ); |
161 | statusMessage( msg ); | 160 | statusMessage( msg ); |
162 | } | 161 | } |
163 | 162 | ||
164 | void KVNC::disconnected() | 163 | void KVNC::disconnected() |
165 | { | 164 | { |
166 | static QString msg = tr( "Connection closed" ); | 165 | static QString msg = tr( "Connection closed" ); |
167 | statusMessage( msg ); | 166 | statusMessage( msg ); |
168 | connectAction->setEnabled( true ); | 167 | connectAction->setEnabled( true ); |
169 | disconnectAction->setEnabled( false ); | 168 | disconnectAction->setEnabled( false ); |
170 | fullScreenAction->setEnabled( false ); | 169 | fullScreenAction->setEnabled( false ); |
171 | } | 170 | } |
172 | 171 | ||
173 | void KVNC::statusMessage( const QString &m ) | 172 | void KVNC::statusMessage( const QString &m ) |
174 | { | 173 | { |
175 | Global::statusMessage( m ); | 174 | Global::statusMessage( m ); |
176 | } | 175 | } |
177 | 176 | ||
178 | void KVNC::error( const QString &msg ) | 177 | void KVNC::error( const QString &msg ) |
179 | { | 178 | { |
180 | statusMessage( msg ); | 179 | statusMessage( msg ); |
181 | QMessageBox::warning( this, tr("VNC Viewer"), msg ); | 180 | QMessageBox::warning( this, tr("VNC Viewer"), msg ); |
182 | } | 181 | } |
183 | 182 | ||
184 | void KVNC::showOptions() | 183 | void KVNC::showOptions() |
185 | { | 184 | { |
186 | KVNCOptionsDlg *wdg = new KVNCOptionsDlg( canvas->connection()->options(), this ); | 185 | KVNCOptionsDlg *wdg = new KVNCOptionsDlg( canvas->connection()->options(), this ); |
187 | wdg->showMaximized(); | 186 | wdg->showMaximized(); |
188 | wdg->exec(); | 187 | wdg->exec(); |
189 | delete wdg; | 188 | delete wdg; |
190 | } | 189 | } |
191 | 190 | ||
diff --git a/noncore/comm/keypebble/kvncoptionsdlg.cpp b/noncore/comm/keypebble/kvncoptionsdlg.cpp index b9f57d1..9d61c7b 100644 --- a/noncore/comm/keypebble/kvncoptionsdlg.cpp +++ b/noncore/comm/keypebble/kvncoptionsdlg.cpp | |||
@@ -1,53 +1,54 @@ | |||
1 | #include <qframe.h> | 1 | #include <qframe.h> |
2 | #include <qvbox.h> | 2 | #include <qvbox.h> |
3 | #include <qcheckbox.h> | 3 | #include <qcheckbox.h> |
4 | #include <qspinbox.h> | 4 | #include <qspinbox.h> |
5 | #include <qlabel.h> | 5 | #include <qlabel.h> |
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
7 | #include <qwhatsthis.h> | 7 | #include <qwhatsthis.h> |
8 | #include <qapplication.h> | 8 | #include <qapplication.h> |
9 | #include "krfboptions.h" | 9 | #include "krfboptions.h" |
10 | 10 | ||
11 | #include "kvncoptionsdlg.h" | 11 | #include "kvncoptionsdlg.h" |
12 | 12 | ||
13 | KVNCOptionsDlg::KVNCOptionsDlg( KRFBOptions *options, | 13 | KVNCOptionsDlg::KVNCOptionsDlg( KRFBOptions *options, |
14 | QWidget *parent, char *name, bool modal ) | 14 | QWidget *parent, char *name, bool modal ) |
15 | : VncOptionsBase( parent, name, modal ) | 15 | : VncOptionsBase( parent, name, modal ) |
16 | { | 16 | { |
17 | this->options = options; | 17 | this->options = options; |
18 | 18 | ||
19 | hex->setChecked( options->hexTile ); | 19 | hex->setChecked( options->hexTile ); |
20 | corre->setChecked( options->corre ); | 20 | corre->setChecked( options->corre ); |
21 | rre->setChecked( options->rre ); | 21 | rre->setChecked( options->rre ); |
22 | copyRect->setChecked( options->copyrect ); | 22 | copyRect->setChecked( options->copyrect ); |
23 | 23 | ||
24 | // TODO | 24 | // TODO |
25 | hex->setEnabled( false ); | 25 | hex->setEnabled( false ); |
26 | corre->setEnabled( false ); | 26 | corre->setEnabled( false ); |
27 | rre->setEnabled( false ); | 27 | rre->setEnabled( false ); |
28 | // /TODO | 28 | // /TODO |
29 | 29 | ||
30 | deIconify->setChecked( options->deIconify ); | 30 | deIconify->setChecked( options->deIconify ); |
31 | bit->setChecked( options->colors256 ); | 31 | bit->setChecked( options->colors256 ); |
32 | shared->setChecked( options->shared ); | 32 | shared->setChecked( options->shared ); |
33 | timeBox->setValue( options->updateRate ); | 33 | timeBox->setValue( options->updateRate ); |
34 | } | 34 | } |
35 | 35 | ||
36 | KVNCOptionsDlg::~KVNCOptionsDlg() | 36 | KVNCOptionsDlg::~KVNCOptionsDlg() |
37 | { | 37 | { |
38 | } | 38 | } |
39 | 39 | ||
40 | void KVNCOptionsDlg::accept() | 40 | void KVNCOptionsDlg::accept() |
41 | { | 41 | { |
42 | options->hexTile = hex->isChecked(); | 42 | options->hexTile = hex->isChecked(); |
43 | options->corre = corre->isChecked(); | 43 | options->corre = corre->isChecked(); |
44 | options->rre = rre->isChecked(); | 44 | options->rre = rre->isChecked(); |
45 | options->copyrect = copyRect->isChecked(); | 45 | options->copyrect = copyRect->isChecked(); |
46 | options->deIconify = deIconify->isChecked(); | 46 | options->deIconify = deIconify->isChecked(); |
47 | options->colors256 = bit->isChecked(); | 47 | options->colors256 = bit->isChecked(); |
48 | options->shared = shared->isChecked(); | 48 | options->shared = shared->isChecked(); |
49 | options->updateRate = timeBox->value(); | 49 | options->updateRate = timeBox->value(); |
50 | options->writeSettings(); | ||
50 | 51 | ||
51 | QDialog::accept(); | 52 | QDialog::accept(); |
52 | } | 53 | } |
53 | 54 | ||
diff --git a/noncore/comm/keypebble/main.cpp b/noncore/comm/keypebble/main.cpp index a32a368..ee3cd79 100644 --- a/noncore/comm/keypebble/main.cpp +++ b/noncore/comm/keypebble/main.cpp | |||
@@ -1,18 +1,17 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include <qurl.h> | 3 | #include <qurl.h> |
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include "kvnc.h" | 5 | #include "kvnc.h" |
6 | 6 | ||
7 | int main( int argc, char **argv ) | 7 | int main( int argc, char **argv ) |
8 | { | 8 | { |
9 | QPEApplication app( argc, argv ); | 9 | QPEApplication app( argc, argv ); |
10 | KVNC *view = new KVNC( "Keypebble" ); | 10 | KVNC *view = new KVNC( "Keypebble" ); |
11 | app.showMainWidget( view ); | 11 | app.showMainWidget( view ); |
12 | 12 | ||
13 | if ( argc > 1 ) | 13 | if ( argc > 1 ) |
14 | view->openURL( QUrl(argv[1]) ); | 14 | view->openURL( QUrl(argv[1]) ); |
15 | 15 | ||
16 | return app.exec(); | 16 | return app.exec(); |
17 | } | 17 | } |
18 | |||