summaryrefslogtreecommitdiff
path: root/noncore/applets
authordrw <drw>2005-03-08 21:50:02 (UTC)
committer drw <drw>2005-03-08 21:50:02 (UTC)
commit2b32d3e15f5774ee8f73977d606675e819498614 (patch) (side-by-side diff)
treee30982f7bfdf36bb8bfc2e3762c2d9234b809607 /noncore/applets
parentd32769dbeedb21fd7bdafb1c762e4e501cb02961 (diff)
downloadopie-2b32d3e15f5774ee8f73977d606675e819498614.zip
opie-2b32d3e15f5774ee8f73977d606675e819498614.tar.gz
opie-2b32d3e15f5774ee8f73977d606675e819498614.tar.bz2
Better version of icon
Diffstat (limited to 'noncore/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/notesapplet/notes.cpp76
1 files changed, 23 insertions, 53 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp
index b3e72a7..d06672a 100644
--- a/noncore/applets/notesapplet/notes.cpp
+++ b/noncore/applets/notesapplet/notes.cpp
@@ -26,2 +26,3 @@
#include <qpe/config.h>
+#include <qpe/resource.h>
using namespace Opie::Core;
@@ -50,34 +51,2 @@ using namespace Opie::Ui;
-/* XPM */
-static char * notes_xpm[] = {
-"16 16 11 1",
-" c None",
-". c #000000",
-"+ c #7F7F7F",
-"@ c #BFBFBF",
-"# c #BFC1FF",
-"$ c #FF0000",
-"% c #FFFFFF",
-"& c #00037F",
-"* c #0006FF",
-"= c #0005BF",
-"- c #7F0000",
-" .. ",
-" .. ",
-" ... ",
-" .+ ",
-" .@. ",
-" . .+ ",
-" ..#.@. ",
-" ..###.+.. ",
-" ..###$...##.. ",
-"..###$$$%+$$##&.",
-".*=####$-###&=&.",
-".=**=###==&=&=..",
-" ..=**=#&=&=.. ",
-" ..=*=&=.. ",
-" ..=.. ",
-" . "};
-
-
NotesControl::NotesControl( QWidget *, const char * )
@@ -88,5 +57,5 @@ NotesControl::NotesControl( QWidget *, const char * )
if( !d.exists()) {
- odebug << "make dir" << oendl;
+ odebug << "make dir" << oendl;
if(!d.mkdir( QDir::homeDirPath()+"/notes", true))
- odebug << "<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed" << oendl;
+ odebug << "<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed" << oendl;
}
@@ -169,3 +138,3 @@ void NotesControl::slotDeleteButton() {
QString selectedText = box->currentText();
- odebug << "deleting "+selectedText << oendl;
+ odebug << "deleting "+selectedText << oendl;
@@ -180,3 +149,3 @@ void NotesControl::slotDeleteButton() {
if(selectedText == cfg.readEntry( entryName )) {
- odebug << "removing " << selectedText.latin1() << ", " << i << "" << oendl;
+ odebug << "removing " << selectedText.latin1() << ", " << i << "" << oendl;
for ( int j = i; j < noOfFiles; j++ ) {
@@ -185,3 +154,3 @@ void NotesControl::slotDeleteButton() {
QString temp = cfg.readEntry(entryName2);
- odebug << "move "+temp << oendl;
+ odebug << "move "+temp << oendl;
cfg.writeEntry(entryName, temp);
@@ -196,6 +165,6 @@ void NotesControl::slotDeleteButton() {
QString fi=QPEApplication::documentDir()+"/text/plain/"+selectedText+".desktop";
- odebug << fi << oendl;
+ odebug << fi << oendl;
QFile f( fi);
- if( !f.remove()) odebug << ".desktop file not removed" << oendl;
+ if( !f.remove()) odebug << ".desktop file not removed" << oendl;
@@ -287,3 +256,3 @@ void NotesControl::save() {
if( edited) {
-// odebug << "is edited" << oendl;
+// odebug << "is edited" << oendl;
QString rt = view->text();
@@ -305,3 +274,3 @@ void NotesControl::save() {
docname = "Empty Text";
-// odebug << docname << oendl;
+// odebug << docname << oendl;
@@ -316,3 +285,3 @@ void NotesControl::save() {
// else
-// odebug << "oldname equals docname" << oendl;
+// odebug << "oldname equals docname" << oendl;
@@ -320,3 +289,3 @@ void NotesControl::save() {
if(QFile(doc->linkFile()).exists())
- odebug << "puppie" << oendl;
+ odebug << "puppie" << oendl;
doc->setType("text/plain");
@@ -331,3 +300,3 @@ void NotesControl::save() {
edited=false;
-// odebug << "save" << oendl;
+// odebug << "save" << oendl;
if (doPopulate)
@@ -343,3 +312,3 @@ void NotesControl::populateBox() {
box->clear();
-// odebug << "populate" << oendl;
+// odebug << "populate" << oendl;
Config cfg("Notes");
@@ -378,3 +347,3 @@ void NotesControl::load() {
void NotesControl::load(const QString & file) {
- odebug << "loading "+file << oendl;
+ odebug << "loading "+file << oendl;
QString name = file;
@@ -405,3 +374,3 @@ void NotesControl::loadDoc( const DocLnk &f) {
if ( !fm.loadFile( f, txt ) ) {
- odebug << "could not load file "+f.file() << oendl;
+ odebug << "could not load file "+f.file() << oendl;
return;
@@ -439,3 +408,3 @@ void NotesControl::slotSearch() {
// if(e->key() == Key_C) { //copy
-// odebug << "copy" << oendl;
+// odebug << "copy" << oendl;
// QClipboard *cb = QApplication::clipboard();
@@ -463,4 +432,5 @@ NotesApplet::NotesApplet( QWidget *parent, const char *name )
: QWidget( parent, name ) {
- setFixedHeight( 18 );
- setFixedWidth( 14 );
+ setFixedHeight( AppLnk::smallIconSize() );
+ setFixedWidth( AppLnk::smallIconSize() );
+ notesPixmap.convertFromImage( Resource::loadImage( "edit" ).smoothScale( height(), width() ) );
vc = new NotesControl;
@@ -486,6 +456,6 @@ void NotesApplet::mousePressEvent( QMouseEvent *) {
if(vc->showMax) {
- odebug << "show max" << oendl;
+ odebug << "show max" << oendl;
vc->showMaximized();
} else {
- odebug << "no show max" << oendl;
+ odebug << "no show max" << oendl;
QWidget *wid = QPEApplication::desktop();
@@ -510,3 +480,3 @@ void NotesApplet::paintEvent( QPaintEvent* ) {
QPainter p(this);
- p.drawPixmap( 0, 1, ( const char** ) notes_xpm );
+ p.drawPixmap( 0, 2, notesPixmap );
}