-rw-r--r-- | core/apps/embeddedkonsole/commandeditdialog.cpp | 23 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 37 |
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 @@ -1,14 +1,18 @@ //comandeditdialog.cpp #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> #include <qlabel.h> #include "smallcommandeditdialogbase.h" CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) : CommandEditDialogBase(parent, name, TRUE, fl) @@ -48,44 +52,49 @@ CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags f item = new QListViewItem( m_SuggestedCommandList,"netstat "); item = new QListViewItem( m_SuggestedCommandList,"route "); item = new QListViewItem( m_SuggestedCommandList,"cardctl eject "); m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE); m_SuggestedCommandList->sort(); 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); connect(ToolButton5,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedDown())); 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 @@ -25,21 +25,21 @@ #include <stdlib.h> #include <sys/types.h> #include <pwd.h> #include <unistd.h> #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> #include <qfontdatabase.h> #include <qfile.h> #include <qspinbox.h> #include <qlayout.h> @@ -371,17 +371,17 @@ void Konsole::init(const char* _pgm, QStrList & _args) b_scroll = TRUE; // histon; n_keytab = 0; n_render = 0; startUp=0; fromMenu = FALSE; 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"); QString tmp; // initialize the list of allowed fonts /////////////////////////////////// QString cfgFontName = cfg.readEntry("FontName","Lcfont"); @@ -565,18 +565,18 @@ void Konsole::init(const char* _pgm, QStrList & _args) #ifdef QT_QWS_OPIE colorMenu->insertItem(tr( "Custom")); #endif 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) )); connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) )); connect( tabMenu, SIGNAL( activated(int) ), this, SLOT( tabMenuSelected(int) )); connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); connect( editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int))); connect( sessionList, SIGNAL(activated(int)), this, SLOT( sessionListSelected(int) ) ); @@ -585,41 +585,50 @@ void Konsole::init(const char* _pgm, QStrList & _args) menuBar->insertItem( tr("Fonts"), fontList ); menuBar->insertItem( tr("Sessions"), sessionList ); toolBar = new QToolBar( this ); 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 ); secondToolBar = new QToolBar( this ); secondToolBar->setHorizontalStretchable( TRUE ); commonCombo = new QComboBox( secondToolBar ); // commonCombo->setMaximumWidth(236); |