author | mickeyl <mickeyl> | 2003-10-27 18:45:36 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-27 18:45:36 (UTC) |
commit | df9d9d818c9667ba8e614e5c09f0e121e9225dfd (patch) (unidiff) | |
tree | fff36af7df853c64c68c839f5fdd9d065ff14e86 | |
parent | 96a577bb03db6ccbf1a10b03116d3b868233df0e (diff) | |
download | opie-df9d9d818c9667ba8e614e5c09f0e121e9225dfd.zip opie-df9d9d818c9667ba8e614e5c09f0e121e9225dfd.tar.gz opie-df9d9d818c9667ba8e614e5c09f0e121e9225dfd.tar.bz2 |
merge noncore/applets/*
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 45 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notes.h | 10 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notesappletimpl.cpp | 1 |
3 files changed, 28 insertions, 28 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 | |||
@@ -80,6 +80,6 @@ static char * notes_xpm[] = { | |||
80 | 80 | ||
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 ) |
85 | { | 85 | { |
@@ -92,5 +92,5 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
92 | Config cfg("Notes"); | 92 | Config cfg("Notes"); |
93 | cfg.setGroup("Options"); | 93 | cfg.setGroup("Options"); |
94 | showMax = cfg.readBoolEntry("ShowMax", false); | 94 | showMax = cfg.readBoolEntry("ShowMax", false); |
95 | 95 | ||
96 | setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); | 96 | setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); |
@@ -99,10 +99,10 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
99 | doPopulate=true; | 99 | doPopulate=true; |
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 | ||
108 | QPEApplication::setStylusOperation( box->viewport(),QPEApplication::RightOnHold); | 108 | QPEApplication::setStylusOperation( box->viewport(),QPEApplication::RightOnHold); |
@@ -113,22 +113,20 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
113 | vbox->setSpacing( 3 ); | 113 | vbox->setSpacing( 3 ); |
114 | 114 | ||
115 | vbox->addWidget( view); | 115 | |
116 | vbox->addWidget( box); | ||
117 | 116 | ||
118 | setFocusPolicy(QWidget::StrongFocus); | 117 | setFocusPolicy(QWidget::StrongFocus); |
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 | ||
134 | connect( box, SIGNAL( mouseButtonPressed( int, QListBoxItem *, const QPoint&)), | 132 | connect( box, SIGNAL( mouseButtonPressed( int, QListBoxItem *, const QPoint&)), |
@@ -148,5 +146,5 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) | |||
148 | load(); | 146 | load(); |
149 | setCaption("Notes"); | 147 | setCaption("Notes"); |
150 | // parent->setFocus(); | 148 | // parent->setFocus(); |
151 | } | 149 | } |
152 | 150 | ||
@@ -160,5 +158,5 @@ void NotesControl::slotDeleteButtonClicked() { | |||
160 | ,tr("Do you really want to<BR><B> delete</B> this note ?") | 158 | ,tr("Do you really want to<BR><B> delete</B> this note ?") |
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(); |
164 | break; | 162 | break; |
@@ -200,9 +198,9 @@ void NotesControl::slotDeleteButton() { | |||
200 | QFile f( fi); | 198 | QFile f( fi); |
201 | if( !f.remove()) qDebug(".desktop file not removed"); | 199 | if( !f.remove()) qDebug(".desktop file not removed"); |
202 | 200 | ||
203 | } | 201 | } |
204 | } | 202 | } |
205 | view->clear(); | 203 | view->clear(); |
206 | 204 | ||
207 | populateBox(); | 205 | populateBox(); |
208 | } | 206 | } |
@@ -336,6 +334,6 @@ void NotesControl::save() { | |||
336 | } | 334 | } |
337 | cfg.writeEntry( "LastDoc",oldDocName ); | 335 | cfg.writeEntry( "LastDoc",oldDocName ); |
338 | cfg.write(); | 336 | cfg.write(); |
339 | 337 | ||
340 | } | 338 | } |
341 | } | 339 | } |
@@ -469,4 +467,5 @@ NotesApplet::NotesApplet( QWidget *parent, const char *name ) | |||
469 | 467 | ||
470 | NotesApplet::~NotesApplet() { | 468 | NotesApplet::~NotesApplet() { |
469 | delete vc; | ||
471 | } | 470 | } |
472 | 471 | ||
diff --git a/noncore/applets/notesapplet/notes.h b/noncore/applets/notesapplet/notes.h index c428efe..08253cb 100644 --- a/noncore/applets/notesapplet/notes.h +++ b/noncore/applets/notesapplet/notes.h | |||
@@ -17,5 +17,5 @@ | |||
17 | 17 | ||
18 | #include <qwidget.h> | 18 | #include <qwidget.h> |
19 | #include <qframe.h> | 19 | #include <qvbox.h> |
20 | #include <qpixmap.h> | 20 | #include <qpixmap.h> |
21 | #include <qguardedptr.h> | 21 | #include <qguardedptr.h> |
@@ -32,5 +32,5 @@ class QMultiLineEdit; | |||
32 | class QListBox; | 32 | class QListBox; |
33 | class QListBoxItem; | 33 | class QListBoxItem; |
34 | class NotesControl : public QFrame { | 34 | class NotesControl : public QVBox { |
35 | Q_OBJECT | 35 | Q_OBJECT |
36 | public: | 36 | public: |
@@ -47,5 +47,5 @@ public: | |||
47 | void populateBox(); | 47 | void populateBox(); |
48 | void load(); | 48 | void load(); |
49 | 49 | ||
50 | private: | 50 | private: |
51 | QTimer menuTimer; | 51 | QTimer menuTimer; |
@@ -77,5 +77,5 @@ public: | |||
77 | NotesApplet( QWidget *parent = 0, const char *name=0 ); | 77 | NotesApplet( QWidget *parent = 0, const char *name=0 ); |
78 | ~NotesApplet(); | 78 | ~NotesApplet(); |
79 | NotesControl *vc; | 79 | NotesControl *vc; |
80 | public slots: | 80 | public slots: |
81 | private: | 81 | private: |
@@ -87,5 +87,5 @@ private: | |||
87 | private slots: | 87 | private slots: |
88 | 88 | ||
89 | 89 | ||
90 | }; | 90 | }; |
91 | 91 | ||
diff --git a/noncore/applets/notesapplet/notesappletimpl.cpp b/noncore/applets/notesapplet/notesappletimpl.cpp index 93e1e97..0526bad 100644 --- a/noncore/applets/notesapplet/notesappletimpl.cpp +++ b/noncore/applets/notesapplet/notesappletimpl.cpp | |||
@@ -19,4 +19,5 @@ NotesAppletImpl::NotesAppletImpl() | |||
19 | 19 | ||
20 | NotesAppletImpl::~NotesAppletImpl() { | 20 | NotesAppletImpl::~NotesAppletImpl() { |
21 | // not needed though cause we should have a valid parent | ||
21 | delete notes; | 22 | delete notes; |
22 | } | 23 | } |