summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-10-27 18:45:36 (UTC)
committer mickeyl <mickeyl>2003-10-27 18:45:36 (UTC)
commitdf9d9d818c9667ba8e614e5c09f0e121e9225dfd (patch) (side-by-side diff)
treefff36af7df853c64c68c839f5fdd9d065ff14e86
parent96a577bb03db6ccbf1a10b03116d3b868233df0e (diff)
downloadopie-df9d9d818c9667ba8e614e5c09f0e121e9225dfd.zip
opie-df9d9d818c9667ba8e614e5c09f0e121e9225dfd.tar.gz
opie-df9d9d818c9667ba8e614e5c09f0e121e9225dfd.tar.bz2
merge noncore/applets/*
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/notesapplet/notes.cpp29
-rw-r--r--noncore/applets/notesapplet/notes.h4
-rw-r--r--noncore/applets/notesapplet/notesappletimpl.cpp1
3 files changed, 17 insertions, 17 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[] = {
-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 )
{
@@ -99,10 +99,10 @@ NotesControl::NotesControl( QWidget *parent, const char *name )
doPopulate=true;
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");
QPEApplication::setStylusOperation( box->viewport(),QPEApplication::RightOnHold);
@@ -113,22 +113,20 @@ NotesControl::NotesControl( QWidget *parent, const char *name )
vbox->setSpacing( 3 );
- vbox->addWidget( view);
- vbox->addWidget( box);
+
setFocusPolicy(QWidget::StrongFocus);
- 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);
+
connect( box, SIGNAL( mouseButtonPressed( int, QListBoxItem *, const QPoint&)),
@@ -469,4 +467,5 @@ NotesApplet::NotesApplet( QWidget *parent, const char *name )
NotesApplet::~NotesApplet() {
+ delete vc;
}
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 @@
#include <qwidget.h>
-#include <qframe.h>
+#include <qvbox.h>
#include <qpixmap.h>
#include <qguardedptr.h>
@@ -32,5 +32,5 @@ class QMultiLineEdit;
class QListBox;
class QListBoxItem;
-class NotesControl : public QFrame {
+class NotesControl : public QVBox {
Q_OBJECT
public:
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()
NotesAppletImpl::~NotesAppletImpl() {
+ // not needed though cause we should have a valid parent
delete notes;
}