summaryrefslogtreecommitdiff
path: root/noncore/applets/notesapplet/notes.cpp
Side-by-side diff
Diffstat (limited to 'noncore/applets/notesapplet/notes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/notesapplet/notes.cpp8
1 files changed, 4 insertions, 4 deletions
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 * )
QPEApplication::setStylusOperation( box->viewport(),QPEApplication::RightOnHold);
box->setFixedHeight(50);
vbox->setMargin( 6 );
vbox->setSpacing( 3 );
setFocusPolicy(QWidget::StrongFocus);
newButton= new QPushButton( hbox, "newButton" );
newButton->setText(tr("New"));
saveButton= new QPushButton( hbox, "saveButton" );
saveButton->setText(tr("Save"));
deleteButton= new QPushButton( hbox, "deleteButton" );
deleteButton->setText(tr("Delete"));
- connect( box, SIGNAL( mouseButtonPressed( int, QListBoxItem *, const QPoint&)),
- this,SLOT( boxPressed(int, QListBoxItem *, const QPoint&)) );
+ connect( box, SIGNAL( mouseButtonPressed(int,QListBoxItem*,const QPoint&)),
+ this,SLOT( boxPressed(int,QListBoxItem*,const QPoint&)) );
- connect(box, SIGNAL(highlighted(const QString&)), this, SLOT(slotBoxSelected(const QString &)));
+ connect(box, SIGNAL(highlighted(const QString&)), this, SLOT(slotBoxSelected(const QString&)));
connect( &menuTimer, SIGNAL( timeout() ), SLOT( showMenu() ) );
connect(view,SIGNAL( textChanged() ), this, SLOT(slotViewEdited() ) );
connect(newButton, SIGNAL(clicked()), this, SLOT(slotNewButton()));
connect(saveButton, SIGNAL(clicked()), this, SLOT(slotSaveButton()));
connect(deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteButtonClicked()));
populateBox();
load();
setCaption("Notes");
// parent->setFocus();
}
void NotesControl::slotSaveButton() {
slotNewButton();
populateBox();
}
void NotesControl::slotDeleteButtonClicked() {
switch ( QMessageBox::warning(this,tr("Delete?")
,tr("Do you really want to<BR><B> delete</B> this note ?")
,tr("Yes"),tr("No"),0,1,1) ) {
@@ -201,49 +201,49 @@ void NotesControl::slotDeleteButton() {
view->clear();
populateBox();
}
}
void NotesControl::slotNewButton() {
if(edited) save();
view->clear();
view->setFocus();
edited=false;
isNew=false;
}
void NotesControl::slotBeamButton() {
Ir ir;
if(!ir.supported()){
} else {
this->hide();
QString selectedText = box->currentText();
if( !selectedText.isEmpty()) {
QString file = QDir::homeDirPath()+"/"+selectedText;
QFile f(file);
Ir *irFile = new Ir(this, "IR");
- connect( irFile, SIGNAL(done(Ir*)), this, SLOT( slotBeamFinished( Ir * )));
+ connect( irFile, SIGNAL(done(Ir*)), this, SLOT( slotBeamFinished(Ir*)));
irFile->send( file, "Note", "text/plain" );
}
}
}
void NotesControl::slotBeamFinished(Ir *) {
this->show();
}
void NotesControl::boxPressed(int mouse, QListBoxItem *, const QPoint&) {
switch (mouse) {
case 1:{
}
break;
case 2:
menuTimer.start( 500, TRUE );
break;
};
}
void NotesControl::slotBoxSelected(const QString &itemString) {
if(edited) {
save();
}