summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole
authordrw <drw>2005-04-15 17:51:00 (UTC)
committer drw <drw>2005-04-15 17:51:00 (UTC)
commitba9d5ecee89aadb135a03c173878e315de784be3 (patch) (side-by-side diff)
tree176d774bebfaa1d016a56fa8c00be79a2ea19fa5 /core/apps/embeddedkonsole
parent86b1feed1ab2e47a082d974e1fcc513c59a74469 (diff)
downloadopie-ba9d5ecee89aadb135a03c173878e315de784be3.zip
opie-ba9d5ecee89aadb135a03c173878e315de784be3.tar.gz
opie-ba9d5ecee89aadb135a03c173878e315de784be3.tar.bz2
Resource -> OResource
Diffstat (limited to 'core/apps/embeddedkonsole') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/commandeditdialog.cpp23
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp37
2 files changed, 39 insertions, 21 deletions
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp
index 697bf72..1e08767 100644
--- a/core/apps/embeddedkonsole/commandeditdialog.cpp
+++ b/core/apps/embeddedkonsole/commandeditdialog.cpp
@@ -2,8 +2,12 @@
#include "commandeditdialog.h"
#include "playlistselection.h"
+
+#include <opie2/oresource.h>
+
#include <qpe/config.h>
-#include <qpe/resource.h>
+
+#include <qapplication.h>
#include <qtoolbutton.h>
#include <qlineedit.h>
#include <qheader.h>
@@ -53,34 +57,39 @@ CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags f
connect( m_SuggestedCommandList, SIGNAL( clicked(QListViewItem*) ), m_PlayListSelection, SLOT( addToSelection(QListViewItem*) ) );
-
+ bool bigPixmaps = qApp->desktop()->size().width()>330;
ToolButton1->setTextLabel("new");
- ToolButton1->setPixmap(Resource::loadPixmap("new"));
+ ToolButton1->setUsesBigPixmap( bigPixmaps );
+ ToolButton1->setPixmap( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ) );
ToolButton1->setAutoRaise(TRUE);
ToolButton1->setFocusPolicy(QWidget::NoFocus);
connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog()));
ToolButton2->setTextLabel("edit");
- ToolButton2->setPixmap(Resource::loadPixmap("edit"));
+ ToolButton2->setUsesBigPixmap( bigPixmaps );
+ ToolButton2->setPixmap( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ) );
ToolButton2->setAutoRaise(TRUE);
ToolButton2->setFocusPolicy(QWidget::NoFocus);
connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog()));
ToolButton3->setTextLabel("delete");
- ToolButton3->setPixmap(Resource::loadPixmap("editdelete"));
+ ToolButton3->setUsesBigPixmap( bigPixmaps );
+ ToolButton3->setPixmap( Opie::Core::OResource::loadPixmap( "editdelete", Opie::Core::OResource::SmallIcon ) );
ToolButton3->setAutoRaise(TRUE);
ToolButton3->setFocusPolicy(QWidget::NoFocus);
connect(ToolButton3,SIGNAL(clicked()),m_PlayListSelection,SLOT(removeSelected()));
ToolButton4->setTextLabel("up");
- ToolButton4->setPixmap(Resource::loadPixmap("up"));
+ ToolButton4->setUsesBigPixmap( bigPixmaps );
+ ToolButton4->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) );
ToolButton4->setAutoRaise(TRUE);
ToolButton4->setFocusPolicy(QWidget::NoFocus);
connect(ToolButton4,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedUp()));
ToolButton5->setTextLabel("down");
- ToolButton5->setPixmap(Resource::loadPixmap("down"));
+ ToolButton5->setUsesBigPixmap( bigPixmaps );
+ ToolButton5->setPixmap( Opie::Core::OResource::loadPixmap( "down", Opie::Core::OResource::SmallIcon ) );
ToolButton5->setAutoRaise(TRUE);
ToolButton5->setFocusPolicy(QWidget::NoFocus);
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index de00494..7f3ea65 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -30,11 +30,11 @@
#ifdef QT_QWS_OPIE
#include <opie2/ocolorpopupmenu.h>
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
+
using namespace Opie;
#endif
-#include <qpe/resource.h>
-
#include <qmenubar.h>
#include <qtabbar.h>
#include <qpe/config.h>
@@ -376,7 +376,7 @@ void Konsole::init(const char* _pgm, QStrList & _args)
fullscreen = false;
setCaption( tr( "Konsole" ) );
- setIcon( Resource::loadPixmap( "konsole/Terminal" ) );
+ setIcon( Opie::Core::OResource::loadPixmap( "konsole/Terminal", Opie::Core::OResource::SmallIcon ) );
Config cfg( "Konsole" );
cfg.setGroup("Font");
@@ -570,8 +570,8 @@ void Konsole::init(const char* _pgm, QStrList & _args)
configMenu->insertItem(tr( "Colors") ,colorMenu);
sessionList = new QPopupMenu(this);
- sessionList-> insertItem ( Resource::loadPixmap ( "konsole/Terminal" ), tr( "new session" ), this,
- SLOT(newSession()) );
+ sessionList-> insertItem ( Opie::Core::OResource::loadPixmap( "konsole/Terminal", Opie::Core::OResource::SmallIcon ),
+ tr( "new session" ), this, SLOT(newSession()) );
// connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
@@ -590,31 +590,40 @@ void Konsole::init(const char* _pgm, QStrList & _args)
QAction *a;
// Button Commands
- a = new QAction( tr("New"), Resource::loadPixmap( "konsole/konsole" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("New"), Opie::Core::OResource::loadPixmap( "konsole/konsole", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) );
a->addTo( toolBar );
- a = new QAction( tr("Full Screen"), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Full Screen"), Opie::Core::OResource::loadPixmap( "fullscreen", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( toggleFullScreen() ) );
a->addTo( toolBar );
- a = new QAction( tr("Zoom"), Resource::loadPixmap( "zoom" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Zoom"), Opie::Core::OResource::loadPixmap( "zoom", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( cycleZoom() ) );
a->addTo( toolBar );
- a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Enter"), Opie::Core::OResource::loadPixmap( "konsole/enter", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolBar );
- a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Space"), Opie::Core::OResource::loadPixmap( "konsole/space", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolBar );
- a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Tab"), Opie::Core::OResource::loadPixmap( "konsole/tab", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolBar );
- a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Up"), Opie::Core::OResource::loadPixmap( "konsole/up", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolBar );
- a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Down"), Opie::Core::OResource::loadPixmap( "konsole/down", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolBar );
- a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 );
+ a = new QAction( tr("Paste"), Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ),
+ QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) );
a->addTo( toolBar );