Diffstat (limited to 'noncore/applets/notesapplet/notes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index 4e98b31..e2b0c2a 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp @@ -81,4 +81,4 @@ static char * notes_xpm[] = { -NotesControl::NotesControl( QWidget *parent, const char *name ) - : QFrame( parent, name,/* WDestructiveClose | */WStyle_StaysOnTop ) +NotesControl::NotesControl( QWidget *, const char * ) + : QVBox( 0, "NotesControl",/* WDestructiveClose | */WStyle_StaysOnTop ) // : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) @@ -93,3 +93,3 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) cfg.setGroup("Options"); - showMax = cfg.readBoolEntry("ShowMax", false); + showMax = cfg.readBoolEntry("ShowMax", false); @@ -100,8 +100,8 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) isNew=false; - QVBoxLayout *vbox = new QVBoxLayout( this,0, -1, "Vlayout" ); - QHBoxLayout *hbox = new QHBoxLayout( this, 0, -1, "HLayout" ); + QVBox *vbox = new QVBox( this, "Vlayout" ); + QHBox *hbox = new QHBox( this, "HLayout" ); - view = new QMultiLineEdit(this, "OpieNotesView"); + view = new QMultiLineEdit(vbox, "OpieNotesView"); - box = new QListBox(this, "OpieNotesBox"); + box = new QListBox(vbox, "OpieNotesBox"); @@ -114,4 +114,3 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) - vbox->addWidget( view); - vbox->addWidget( box); + @@ -119,15 +118,14 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) - newButton= new QPushButton( this, "newButton" ); + newButton= new QPushButton( hbox, "newButton" ); newButton->setText(tr("New")); - hbox->addWidget( newButton); - saveButton= new QPushButton( this, "saveButton" ); + + saveButton= new QPushButton( hbox, "saveButton" ); saveButton->setText(tr("Save")); - hbox->addWidget( saveButton); - deleteButton= new QPushButton( this, "deleteButton" ); + + deleteButton= new QPushButton( hbox, "deleteButton" ); deleteButton->setText(tr("Delete")); - hbox->addWidget( deleteButton); - - vbox->addItem(hbox); + + @@ -149,3 +147,3 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) setCaption("Notes"); - // parent->setFocus(); + // parent->setFocus(); } @@ -161,3 +159,3 @@ void NotesControl::slotDeleteButtonClicked() { ,tr("Yes"),tr("No"),0,1,1) ) { - case 0: + case 0: slotDeleteButton(); @@ -201,3 +199,3 @@ void NotesControl::slotDeleteButton() { if( !f.remove()) qDebug(".desktop file not removed"); - + } @@ -205,3 +203,3 @@ void NotesControl::slotDeleteButton() { view->clear(); - + populateBox(); @@ -337,4 +335,4 @@ void NotesControl::save() { cfg.writeEntry( "LastDoc",oldDocName ); - cfg.write(); - + cfg.write(); + } @@ -470,2 +468,3 @@ NotesApplet::NotesApplet( QWidget *parent, const char *name ) NotesApplet::~NotesApplet() { + delete vc; } |