-rw-r--r-- | noncore/applets/memoryapplet/swapfile.cpp | 4 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 8 | ||||
-rw-r--r-- | noncore/applets/wirelessapplet/wireless.cpp | 8 | ||||
-rw-r--r-- | noncore/applets/zkbapplet/zkbwidget.cpp | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp index 04da8bb..9416db3 100644 --- a/noncore/applets/memoryapplet/swapfile.cpp +++ b/noncore/applets/memoryapplet/swapfile.cpp | |||
@@ -89,51 +89,51 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f ) | |||
89 | 89 | ||
90 | mkswapProgress = new QProgressBar(3, hb3); | 90 | mkswapProgress = new QProgressBar(3, hb3); |
91 | mkswapProgress->setCenterIndicator(true); | 91 | mkswapProgress->setCenterIndicator(true); |
92 | 92 | ||
93 | QHBox *hb4 = new QHBox(this); | 93 | QHBox *hb4 = new QHBox(this); |
94 | hb4->setSpacing(5); | 94 | hb4->setSpacing(5); |
95 | 95 | ||
96 | swapStatusIcon = new QLabel(hb4); | 96 | swapStatusIcon = new QLabel(hb4); |
97 | swapStatus = new QLabel(tr(""), hb4); | 97 | swapStatus = new QLabel(tr(""), hb4); |
98 | hb4->setStretchFactor(swapStatus, 99); | 98 | hb4->setStretchFactor(swapStatus, 99); |
99 | vb->addWidget(hb4); | 99 | vb->addWidget(hb4); |
100 | 100 | ||
101 | connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon())); | 101 | connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon())); |
102 | connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff())); | 102 | connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff())); |
103 | connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 103 | connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
104 | connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 104 | connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
105 | connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 105 | connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
106 | connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile())); | 106 | connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile())); |
107 | connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile())); | 107 | connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile())); |
108 | 108 | ||
109 | cfRB->setEnabled(FALSE); | 109 | cfRB->setEnabled(FALSE); |
110 | sdRB->setEnabled(FALSE); | 110 | sdRB->setEnabled(FALSE); |
111 | 111 | ||
112 | QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); | 112 | QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); |
113 | connect(pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(cardnotify(const QCString &, const QByteArray &))); | 113 | connect(pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); |
114 | QCopChannel *sdChannel = new QCopChannel("QPE/Card", this); | 114 | QCopChannel *sdChannel = new QCopChannel("QPE/Card", this); |
115 | connect(sdChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(cardnotify(const QCString &, const QByteArray &))); | 115 | connect(sdChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); |
116 | 116 | ||
117 | cardInPcmcia0 = FALSE; | 117 | cardInPcmcia0 = FALSE; |
118 | cardInPcmcia1 = FALSE; | 118 | cardInPcmcia1 = FALSE; |
119 | cardInSd = FALSE; | 119 | cardInSd = FALSE; |
120 | 120 | ||
121 | Swapfile::status(); | 121 | Swapfile::status(); |
122 | Swapfile::getStatusPcmcia(); | 122 | Swapfile::getStatusPcmcia(); |
123 | Swapfile::getStatusSd(); | 123 | Swapfile::getStatusSd(); |
124 | } | 124 | } |
125 | 125 | ||
126 | int Swapfile::exec(const QString& arg) | 126 | int Swapfile::exec(const QString& arg) |
127 | { | 127 | { |
128 | return system((!isRoot ? "sudo " : "") + arg); | 128 | return system((!isRoot ? "sudo " : "") + arg); |
129 | } | 129 | } |
130 | 130 | ||
131 | 131 | ||
132 | Swapfile::~Swapfile() | 132 | Swapfile::~Swapfile() |
133 | { | 133 | { |
134 | } | 134 | } |
135 | 135 | ||
136 | void Swapfile::cardnotify(const QCString & msg, const QByteArray &) | 136 | void Swapfile::cardnotify(const QCString & msg, const QByteArray &) |
137 | { | 137 | { |
138 | if (msg == "stabChanged()") | 138 | if (msg == "stabChanged()") |
139 | { | 139 | { |
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index 1142028..9b5e475 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp | |||
@@ -106,52 +106,52 @@ NotesControl::NotesControl( QWidget *, const char * ) | |||
106 | QPEApplication::setStylusOperation( box->viewport(),QPEApplication::RightOnHold); | 106 | QPEApplication::setStylusOperation( box->viewport(),QPEApplication::RightOnHold); |
107 | 107 | ||
108 | box->setFixedHeight(50); | 108 | box->setFixedHeight(50); |
109 | 109 | ||
110 | vbox->setMargin( 6 ); | 110 | vbox->setMargin( 6 ); |
111 | vbox->setSpacing( 3 ); | 111 | vbox->setSpacing( 3 ); |
112 | 112 | ||
113 | 113 | ||
114 | 114 | ||
115 | setFocusPolicy(QWidget::StrongFocus); | 115 | setFocusPolicy(QWidget::StrongFocus); |
116 | 116 | ||
117 | newButton= new QPushButton( hbox, "newButton" ); | 117 | newButton= new QPushButton( hbox, "newButton" ); |
118 | newButton->setText(tr("New")); | 118 | newButton->setText(tr("New")); |
119 | 119 | ||
120 | 120 | ||
121 | saveButton= new QPushButton( hbox, "saveButton" ); | 121 | saveButton= new QPushButton( hbox, "saveButton" ); |
122 | saveButton->setText(tr("Save")); | 122 | saveButton->setText(tr("Save")); |
123 | 123 | ||
124 | 124 | ||
125 | deleteButton= new QPushButton( hbox, "deleteButton" ); | 125 | deleteButton= new QPushButton( hbox, "deleteButton" ); |
126 | deleteButton->setText(tr("Delete")); | 126 | deleteButton->setText(tr("Delete")); |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | connect( box, SIGNAL( mouseButtonPressed( int, QListBoxItem *, const QPoint&)), | 130 | connect( box, SIGNAL( mouseButtonPressed(int,QListBoxItem*,const QPoint&)), |
131 | this,SLOT( boxPressed(int, QListBoxItem *, const QPoint&)) ); | 131 | this,SLOT( boxPressed(int,QListBoxItem*,const QPoint&)) ); |
132 | 132 | ||
133 | connect(box, SIGNAL(highlighted(const QString&)), this, SLOT(slotBoxSelected(const QString &))); | 133 | connect(box, SIGNAL(highlighted(const QString&)), this, SLOT(slotBoxSelected(const QString&))); |
134 | 134 | ||
135 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showMenu() ) ); | 135 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showMenu() ) ); |
136 | 136 | ||
137 | connect(view,SIGNAL( textChanged() ), this, SLOT(slotViewEdited() ) ); | 137 | connect(view,SIGNAL( textChanged() ), this, SLOT(slotViewEdited() ) ); |
138 | 138 | ||
139 | connect(newButton, SIGNAL(clicked()), this, SLOT(slotNewButton())); | 139 | connect(newButton, SIGNAL(clicked()), this, SLOT(slotNewButton())); |
140 | connect(saveButton, SIGNAL(clicked()), this, SLOT(slotSaveButton())); | 140 | connect(saveButton, SIGNAL(clicked()), this, SLOT(slotSaveButton())); |
141 | connect(deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteButtonClicked())); | 141 | connect(deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteButtonClicked())); |
142 | 142 | ||
143 | populateBox(); | 143 | populateBox(); |
144 | load(); | 144 | load(); |
145 | setCaption("Notes"); | 145 | setCaption("Notes"); |
146 | // parent->setFocus(); | 146 | // parent->setFocus(); |
147 | } | 147 | } |
148 | 148 | ||
149 | void NotesControl::slotSaveButton() { | 149 | void NotesControl::slotSaveButton() { |
150 | slotNewButton(); | 150 | slotNewButton(); |
151 | populateBox(); | 151 | populateBox(); |
152 | } | 152 | } |
153 | 153 | ||
154 | void NotesControl::slotDeleteButtonClicked() { | 154 | void NotesControl::slotDeleteButtonClicked() { |
155 | switch ( QMessageBox::warning(this,tr("Delete?") | 155 | switch ( QMessageBox::warning(this,tr("Delete?") |
156 | ,tr("Do you really want to<BR><B> delete</B> this note ?") | 156 | ,tr("Do you really want to<BR><B> delete</B> this note ?") |
157 | ,tr("Yes"),tr("No"),0,1,1) ) { | 157 | ,tr("Yes"),tr("No"),0,1,1) ) { |
@@ -201,49 +201,49 @@ void NotesControl::slotDeleteButton() { | |||
201 | view->clear(); | 201 | view->clear(); |
202 | 202 | ||
203 | populateBox(); | 203 | populateBox(); |
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | void NotesControl::slotNewButton() { | 207 | void NotesControl::slotNewButton() { |
208 | if(edited) save(); | 208 | if(edited) save(); |
209 | view->clear(); | 209 | view->clear(); |
210 | view->setFocus(); | 210 | view->setFocus(); |
211 | edited=false; | 211 | edited=false; |
212 | isNew=false; | 212 | isNew=false; |
213 | } | 213 | } |
214 | 214 | ||
215 | void NotesControl::slotBeamButton() { | 215 | void NotesControl::slotBeamButton() { |
216 | Ir ir; | 216 | Ir ir; |
217 | if(!ir.supported()){ | 217 | if(!ir.supported()){ |
218 | } else { | 218 | } else { |
219 | this->hide(); | 219 | this->hide(); |
220 | QString selectedText = box->currentText(); | 220 | QString selectedText = box->currentText(); |
221 | if( !selectedText.isEmpty()) { | 221 | if( !selectedText.isEmpty()) { |
222 | QString file = QDir::homeDirPath()+"/"+selectedText; | 222 | QString file = QDir::homeDirPath()+"/"+selectedText; |
223 | QFile f(file); | 223 | QFile f(file); |
224 | Ir *irFile = new Ir(this, "IR"); | 224 | Ir *irFile = new Ir(this, "IR"); |
225 | connect( irFile, SIGNAL(done(Ir*)), this, SLOT( slotBeamFinished( Ir * ))); | 225 | connect( irFile, SIGNAL(done(Ir*)), this, SLOT( slotBeamFinished(Ir*))); |
226 | irFile->send( file, "Note", "text/plain" ); | 226 | irFile->send( file, "Note", "text/plain" ); |
227 | } | 227 | } |
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
231 | void NotesControl::slotBeamFinished(Ir *) { | 231 | void NotesControl::slotBeamFinished(Ir *) { |
232 | this->show(); | 232 | this->show(); |
233 | } | 233 | } |
234 | 234 | ||
235 | void NotesControl::boxPressed(int mouse, QListBoxItem *, const QPoint&) { | 235 | void NotesControl::boxPressed(int mouse, QListBoxItem *, const QPoint&) { |
236 | switch (mouse) { | 236 | switch (mouse) { |
237 | case 1:{ | 237 | case 1:{ |
238 | } | 238 | } |
239 | break; | 239 | break; |
240 | case 2: | 240 | case 2: |
241 | menuTimer.start( 500, TRUE ); | 241 | menuTimer.start( 500, TRUE ); |
242 | break; | 242 | break; |
243 | }; | 243 | }; |
244 | } | 244 | } |
245 | 245 | ||
246 | void NotesControl::slotBoxSelected(const QString &itemString) { | 246 | void NotesControl::slotBoxSelected(const QString &itemString) { |
247 | if(edited) { | 247 | if(edited) { |
248 | save(); | 248 | save(); |
249 | } | 249 | } |
diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp index 9ce6618..6ef2e44 100644 --- a/noncore/applets/wirelessapplet/wireless.cpp +++ b/noncore/applets/wirelessapplet/wireless.cpp | |||
@@ -100,59 +100,59 @@ WirelessControl::WirelessControl( WirelessApplet *applet, QWidget *parent, const | |||
100 | 100 | ||
101 | QPushButton* advanced = new QPushButton( "Advanced...", this ); | 101 | QPushButton* advanced = new QPushButton( "Advanced...", this ); |
102 | advanced->setFocusPolicy( QWidget::NoFocus ); | 102 | advanced->setFocusPolicy( QWidget::NoFocus ); |
103 | grid->addWidget( advanced, 2, 0, Qt::AlignCenter ); | 103 | grid->addWidget( advanced, 2, 0, Qt::AlignCenter ); |
104 | connect( advanced, SIGNAL( clicked() ), | 104 | connect( advanced, SIGNAL( clicked() ), |
105 | this, SLOT( advancedConfigClicked() ) ); | 105 | this, SLOT( advancedConfigClicked() ) ); |
106 | 106 | ||
107 | /* update Frequency Label */ | 107 | /* update Frequency Label */ |
108 | 108 | ||
109 | updateLabel = new QLabel( this ); | 109 | updateLabel = new QLabel( this ); |
110 | text.sprintf( "Update every %d s", updateFrequency ); | 110 | text.sprintf( "Update every %d s", updateFrequency ); |
111 | updateLabel->setText( text ); | 111 | updateLabel->setText( text ); |
112 | grid->addWidget( updateLabel, 2, 1 ); | 112 | grid->addWidget( updateLabel, 2, 1 ); |
113 | 113 | ||
114 | /* update Frequency Slider */ | 114 | /* update Frequency Slider */ |
115 | 115 | ||
116 | QSlider* updateSlider = new QSlider( QSlider::Horizontal, this ); | 116 | QSlider* updateSlider = new QSlider( QSlider::Horizontal, this ); |
117 | updateSlider->setRange( 0, 9 ); | 117 | updateSlider->setRange( 0, 9 ); |
118 | updateSlider->setValue( updateFrequency ); | 118 | updateSlider->setValue( updateFrequency ); |
119 | updateSlider->setTickmarks( QSlider::Both ); | 119 | updateSlider->setTickmarks( QSlider::Both ); |
120 | updateSlider->setTickInterval( 1 ); | 120 | updateSlider->setTickInterval( 1 ); |
121 | updateSlider->setSteps( 1, 1 ); | 121 | updateSlider->setSteps( 1, 1 ); |
122 | updateSlider->setFocusPolicy( QWidget::NoFocus ); | 122 | updateSlider->setFocusPolicy( QWidget::NoFocus ); |
123 | grid->addWidget( updateSlider, 1, 1 ); | 123 | grid->addWidget( updateSlider, 1, 1 ); |
124 | connect( updateSlider, SIGNAL( valueChanged( int ) ), | 124 | connect( updateSlider, SIGNAL( valueChanged(int) ), |
125 | this, SLOT( updateDelayChange( int ) ) ); | 125 | this, SLOT( updateDelayChange(int) ) ); |
126 | 126 | ||
127 | setFixedSize( sizeHint() ); | 127 | setFixedSize( sizeHint() ); |
128 | setFocusPolicy( QWidget::NoFocus ); | 128 | setFocusPolicy( QWidget::NoFocus ); |
129 | 129 | ||
130 | applet->displayStyleChange( displayStyle ); | 130 | applet->displayStyleChange( displayStyle ); |
131 | applet->updateDelayChange( updateFrequency ); | 131 | applet->updateDelayChange( updateFrequency ); |
132 | 132 | ||
133 | connect( group, SIGNAL( clicked( int ) ), | 133 | connect( group, SIGNAL( clicked(int) ), |
134 | this, SLOT( displayStyleChange( int ) ) ); | 134 | this, SLOT( displayStyleChange(int) ) ); |
135 | 135 | ||
136 | applet->updateDHCPConfig( rocESSID, rocFREQ, rocAP, rocMODE ); | 136 | applet->updateDHCPConfig( rocESSID, rocFREQ, rocAP, rocMODE ); |
137 | } | 137 | } |
138 | 138 | ||
139 | void WirelessControl::advancedConfigClicked() | 139 | void WirelessControl::advancedConfigClicked() |
140 | { | 140 | { |
141 | AdvancedConfig * a = new AdvancedConfig( this, "dialog", TRUE ); | 141 | AdvancedConfig * a = new AdvancedConfig( this, "dialog", TRUE ); |
142 | int result = a->exec(); | 142 | int result = a->exec(); |
143 | a->hide(); | 143 | a->hide(); |
144 | delete a; | 144 | delete a; |
145 | if ( result == QDialog::Accepted ) | 145 | if ( result == QDialog::Accepted ) |
146 | { | 146 | { |
147 | readConfig(); | 147 | readConfig(); |
148 | applet->updateDHCPConfig( rocESSID, rocFREQ, rocAP, rocMODE ); | 148 | applet->updateDHCPConfig( rocESSID, rocFREQ, rocAP, rocMODE ); |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | void WirelessControl::updateDelayChange( int delay ) | 152 | void WirelessControl::updateDelayChange( int delay ) |
153 | { | 153 | { |
154 | QString text; | 154 | QString text; |
155 | text.sprintf( "Update every %d s", delay ); | 155 | text.sprintf( "Update every %d s", delay ); |
156 | updateLabel->setText( text ); | 156 | updateLabel->setText( text ); |
157 | applet->updateDelayChange( delay ); | 157 | applet->updateDelayChange( delay ); |
158 | writeConfigEntry( "UpdateFrequency", delay ); | 158 | writeConfigEntry( "UpdateFrequency", delay ); |
diff --git a/noncore/applets/zkbapplet/zkbwidget.cpp b/noncore/applets/zkbapplet/zkbwidget.cpp index 0b5ab78..0083e9b 100644 --- a/noncore/applets/zkbapplet/zkbwidget.cpp +++ b/noncore/applets/zkbapplet/zkbwidget.cpp | |||
@@ -1,46 +1,46 @@ | |||
1 | #include <opie2/otaskbarapplet.h> | 1 | #include <opie2/otaskbarapplet.h> |
2 | #include <qpe/qcopenvelope_qws.h> | 2 | #include <qpe/qcopenvelope_qws.h> |
3 | #include <qpe/applnk.h> | 3 | #include <qpe/applnk.h> |
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include <qpe/resource.h> | 5 | #include <qpe/resource.h> |
6 | #include <stdio.h> | 6 | #include <stdio.h> |
7 | #include <unistd.h> | 7 | #include <unistd.h> |
8 | #include "zkbwidget.h" | 8 | #include "zkbwidget.h" |
9 | #include "zkbcfg.h" | 9 | #include "zkbcfg.h" |
10 | 10 | ||
11 | ZkbWidget::ZkbWidget(QWidget* parent):QLabel(parent),keymap(0), | 11 | ZkbWidget::ZkbWidget(QWidget* parent):QLabel(parent),keymap(0), |
12 | disabled(Resource::loadPixmap("zkb-disabled")) { | 12 | disabled(Resource::loadPixmap("zkb-disabled")) { |
13 | 13 | ||
14 | labels = new QPopupMenu(); | 14 | labels = new QPopupMenu(); |
15 | connect(labels, SIGNAL(activated(int)), this, | 15 | connect(labels, SIGNAL(activated(int)), this, |
16 | SLOT(labelChanged(int))); | 16 | SLOT(labelChanged(int))); |
17 | 17 | ||
18 | loadKeymap(); | 18 | loadKeymap(); |
19 | 19 | ||
20 | channel = new QCopChannel("QPE/zkb", this); | 20 | channel = new QCopChannel("QPE/zkb", this); |
21 | connect(channel, SIGNAL(received(const QCString&, const QByteArray&)), | 21 | connect(channel, SIGNAL(received(const QCString&,const QByteArray&)), |
22 | this, SLOT(signalReceived(const QCString&, const QByteArray&))); | 22 | this, SLOT(signalReceived(const QCString&,const QByteArray&))); |
23 | setFixedWidth ( AppLnk::smallIconSize() ); | 23 | setFixedWidth ( AppLnk::smallIconSize() ); |
24 | setFixedHeight ( AppLnk::smallIconSize() ); | 24 | setFixedHeight ( AppLnk::smallIconSize() ); |
25 | } | 25 | } |
26 | 26 | ||
27 | ZkbWidget::~ZkbWidget() { | 27 | ZkbWidget::~ZkbWidget() { |
28 | } | 28 | } |
29 | 29 | ||
30 | int ZkbWidget::position() | 30 | int ZkbWidget::position() |
31 | { | 31 | { |
32 | return 8; | 32 | return 8; |
33 | } | 33 | } |
34 | 34 | ||
35 | bool ZkbWidget::loadKeymap() { | 35 | bool ZkbWidget::loadKeymap() { |
36 | ZkbConfig c(QPEApplication::qpeDir()+"/share/zkb"); | 36 | ZkbConfig c(QPEApplication::qpeDir()+"/share/zkb"); |
37 | QFontMetrics fm(font()); | 37 | QFontMetrics fm(font()); |
38 | 38 | ||
39 | if (keymap != 0) { | 39 | if (keymap != 0) { |
40 | delete keymap; | 40 | delete keymap; |
41 | keymap = 0; | 41 | keymap = 0; |
42 | } | 42 | } |
43 | 43 | ||
44 | Keymap* km = new Keymap(); | 44 | Keymap* km = new Keymap(); |
45 | 45 | ||
46 | if (!c.load("zkb.xml", *km, "")) { | 46 | if (!c.load("zkb.xml", *km, "")) { |