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[] = { | |||
81 | 81 | ||
82 | NotesControl::NotesControl( QWidget *parent, const char *name ) | 82 | NotesControl::NotesControl( QWidget *, const char * ) |
83 | : QFrame( parent, name,/* WDestructiveClose | */WStyle_StaysOnTop ) | 83 | : QVBox( 0, "NotesControl",/* WDestructiveClose | */WStyle_StaysOnTop ) |
84 | // : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) | 84 | // : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) |
@@ -93,3 +93,3 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
93 | cfg.setGroup("Options"); | 93 | cfg.setGroup("Options"); |
94 | showMax = cfg.readBoolEntry("ShowMax", false); | 94 | showMax = cfg.readBoolEntry("ShowMax", false); |
95 | 95 | ||
@@ -100,8 +100,8 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
100 | isNew=false; | 100 | isNew=false; |
101 | QVBoxLayout *vbox = new QVBoxLayout( this,0, -1, "Vlayout" ); | 101 | QVBox *vbox = new QVBox( this, "Vlayout" ); |
102 | QHBoxLayout *hbox = new QHBoxLayout( this, 0, -1, "HLayout" ); | 102 | QHBox *hbox = new QHBox( this, "HLayout" ); |
103 | 103 | ||
104 | view = new QMultiLineEdit(this, "OpieNotesView"); | 104 | view = new QMultiLineEdit(vbox, "OpieNotesView"); |
105 | 105 | ||
106 | box = new QListBox(this, "OpieNotesBox"); | 106 | box = new QListBox(vbox, "OpieNotesBox"); |
107 | 107 | ||
@@ -114,4 +114,3 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
114 | 114 | ||
115 | vbox->addWidget( view); | 115 | |
116 | vbox->addWidget( box); | ||
117 | 116 | ||
@@ -119,15 +118,14 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
119 | 118 | ||
120 | newButton= new QPushButton( this, "newButton" ); | 119 | newButton= new QPushButton( hbox, "newButton" ); |
121 | newButton->setText(tr("New")); | 120 | newButton->setText(tr("New")); |
122 | hbox->addWidget( newButton); | ||
123 | 121 | ||
124 | saveButton= new QPushButton( this, "saveButton" ); | 122 | |
123 | saveButton= new QPushButton( hbox, "saveButton" ); | ||
125 | saveButton->setText(tr("Save")); | 124 | saveButton->setText(tr("Save")); |
126 | hbox->addWidget( saveButton); | ||
127 | 125 | ||
128 | deleteButton= new QPushButton( this, "deleteButton" ); | 126 | |
127 | deleteButton= new QPushButton( hbox, "deleteButton" ); | ||
129 | deleteButton->setText(tr("Delete")); | 128 | deleteButton->setText(tr("Delete")); |
130 | hbox->addWidget( deleteButton); | 129 | |
131 | 130 | ||
132 | vbox->addItem(hbox); | ||
133 | 131 | ||
@@ -149,3 +147,3 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
149 | setCaption("Notes"); | 147 | setCaption("Notes"); |
150 | // parent->setFocus(); | 148 | // parent->setFocus(); |
151 | } | 149 | } |
@@ -161,3 +159,3 @@ void NotesControl::slotDeleteButtonClicked() { | |||
161 | ,tr("Yes"),tr("No"),0,1,1) ) { | 159 | ,tr("Yes"),tr("No"),0,1,1) ) { |
162 | case 0: | 160 | case 0: |
163 | slotDeleteButton(); | 161 | slotDeleteButton(); |
@@ -201,3 +199,3 @@ void NotesControl::slotDeleteButton() { | |||
201 | if( !f.remove()) qDebug(".desktop file not removed"); | 199 | if( !f.remove()) qDebug(".desktop file not removed"); |
202 | 200 | ||
203 | } | 201 | } |
@@ -205,3 +203,3 @@ void NotesControl::slotDeleteButton() { | |||
205 | view->clear(); | 203 | view->clear(); |
206 | 204 | ||
207 | populateBox(); | 205 | populateBox(); |
@@ -337,4 +335,4 @@ void NotesControl::save() { | |||
337 | cfg.writeEntry( "LastDoc",oldDocName ); | 335 | cfg.writeEntry( "LastDoc",oldDocName ); |
338 | cfg.write(); | 336 | cfg.write(); |
339 | 337 | ||
340 | } | 338 | } |
@@ -470,2 +468,3 @@ NotesApplet::NotesApplet( QWidget *parent, const char *name ) | |||
470 | NotesApplet::~NotesApplet() { | 468 | NotesApplet::~NotesApplet() { |
469 | delete vc; | ||
471 | } | 470 | } |