-rw-r--r-- | noncore/apps/opie-console/function_keyboard.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.h | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 42 |
3 files changed, 30 insertions, 26 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index 0abe0d9..389618c 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp @@ -80,13 +80,13 @@ void FunctionKeyboard::load (const Profile& prof) { QStringList l = QStringList::split(QChar('|'), values, TRUE); keys[h] = FKey(l[0], l[1], l[2].toInt(), l[3].toInt()); // load pixmap if used if (!l[1].isEmpty()) { - keys[h].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + l[1] ) ); + keys[h].pix = new QPixmap( Opie::Core::OResource::loadPixmap( "console/keys/" + l[1] ) ); } } } if (keys.isEmpty()) loadDefaults(); @@ -274,14 +274,13 @@ FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* par m_labels->setInsertionPolicy(QComboBox::AtCurrent); m_labels->insertItem(""); QStringList files = QDir( QPEApplication::qpeDir() + "pics/console/keys/", "*.png").entryList(); for (uint i = 0; i < files.count(); i++) { - - m_labels->insertItem( Resource::loadPixmap("console/keys/" + files[i]), files[i]); + m_labels->insertItem( Opie::Core::OResource::loadPixmap("console/keys/" + files[i]), files[i]); } connect (m_labels, SIGNAL(activated(int)), this, SLOT(slotChangeIcon(int))); connect (m_labels, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeLabelText(const QString&))); l = new QLabel(tr("Q Keycode", "Qt Key Code for the OnScreen Keyboard"), editKey); m_qvalues = new QComboBox(true, editKey); @@ -325,13 +324,13 @@ void FunctionKeyboardConfig::load (const Profile& prof) { QStringList l = QStringList::split(QChar('|'), values, TRUE); kb->keys[h] = FKey(l[0], l[1], l[2].toInt(), l[3].toInt()); // load pixmap if used if (!l[1].isEmpty()) { - kb->keys[h].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + l[1] ) ); + kb->keys[h].pix = new QPixmap( Opie::Core::OResource::loadPixmap( "console/keys/" + l[1] ) ); } } } } void FunctionKeyboardConfig::save (Profile& prof) { @@ -400,13 +399,13 @@ void FunctionKeyboardConfig::slotChangeIcon(int index) { } else { // is a pixmap m_labels->setEditable(false); kb->keys[selectedHandle].pixFile = m_labels->currentText(); - kb->keys[selectedHandle].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + m_labels->currentText() ) ); + kb->keys[selectedHandle].pix = new QPixmap( Opie::Core::OResource::loadPixmap( "console/keys/" + m_labels->currentText() ) ); } kb->paintKey(selectedRow, selectedCol); } void FunctionKeyboardConfig::slotChangeLabelText(const QString &label) { kb->keys[selectedHandle].label = label; diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h index a60ff4b..b7e211c 100644 --- a/noncore/apps/opie-console/function_keyboard.h +++ b/noncore/apps/opie-console/function_keyboard.h @@ -1,11 +1,12 @@ #ifndef OPIE_FUNCTION_KEYBOARD_H #define OPIE_FUNCTION_KEYBOARD_H +#include <opie2/oresource.h> + #include <qpe/config.h> -#include <qpe/resource.h> #include <qpe/qpeapplication.h> #include <qframe.h> #include <qpainter.h> #include <qvbox.h> #include <qgroupbox.h> #include <qmap.h> @@ -19,13 +20,13 @@ struct FKey { FKey(): qcode(0), unicode(0) {}; FKey(const QString &l, const QString &f, ushort q, ushort u): label(l), pixFile(f), qcode(q), unicode(u) { if (!f.isEmpty()) { - pix = new QPixmap ( Resource::loadPixmap("console/keys/" + f ) ); + pix = new QPixmap ( Opie::Core::OResource::loadPixmap("console/keys/" + f ) ); } }; QString label; QPixmap *pix; QString pixFile; diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index eaa78c8..45a662c 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -10,12 +10,13 @@ #include "emulation_handler.h" #include "script.h" #include "fixit.h" /* OPIE */ #include <opie2/ofiledialog.h> +#include <opie2/oresource.h> #include <qpe/filemanager.h> using namespace Opie::Ui; /* QT */ #include <qaction.h> #include <qmenubar.h> @@ -73,92 +74,95 @@ void MainWindow::initUI() { m_icons = new QToolBar(this); /* * the settings action */ m_setProfiles = new QAction(tr("Configure Profiles"), - Resource::loadPixmap( "SettingsIcon" ), - QString::null, 0, this, 0); + Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0); m_setProfiles->addTo( m_console ); connect( m_setProfiles, SIGNAL(activated() ), this, SLOT(slotConfigure() ) ); m_console->insertSeparator(); /* * new Action for new sessions */ QAction* newCon = new QAction(tr("New Profile"), - Resource::loadPixmap( "new" ), - QString::null, 0, this, 0); + Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0); newCon->addTo( m_console ); connect( newCon, SIGNAL(activated() ), this, SLOT(slotNew() ) ); m_console->insertSeparator(); QAction *saveCon = new QAction( tr("Save Profile" ), - Resource::loadPixmap( "save" ), QString::null, - 0, this, 0 ); + Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ), QString::null, + 0, this, 0 ); saveCon->addTo( m_console ); connect( saveCon, SIGNAL(activated() ), this, SLOT(slotSaveSession() ) ); m_console->insertSeparator(); /* * connect action */ - m_connect = new QAction( tr("Connect"), Resource::loadPixmap("console/connected"), - QString::null, 0, this, 0 ); + m_connect = new QAction( tr("Connect"), Opie::Core::OResource::loadPixmap("console/connected", + Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); m_connect->addTo( m_console ); connect(m_connect, SIGNAL(activated() ), this, SLOT(slotConnect() ) ); /* * disconnect action */ - m_disconnect = new QAction( tr("Disconnect"), Resource::loadPixmap("console/notconnected"), - QString::null, 0, this, 0 ); + m_disconnect = new QAction( tr("Disconnect"), Opie::Core::OResource::loadPixmap("console/notconnected", + Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); m_disconnect->addTo( m_console ); connect(m_disconnect, SIGNAL(activated() ), this, SLOT(slotDisconnect() ) ); m_console->insertSeparator(); #ifndef EAST - m_quickLaunch = new QAction( tr("QuickLaunch"), Resource::loadPixmap("console/konsole_mini"), QString::null, 0, this, 0 ); + m_quickLaunch = new QAction( tr("QuickLaunch"), + Opie::Core::OResource::loadPixmap("console/konsole_mini", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); m_quickLaunch->addTo( m_icons ); connect( m_quickLaunch, SIGNAL( activated() ), this, SLOT( slotQuickLaunch() ) ); #endif QWhatsThis::add( m_icons, tr( "The shell button launches the \"default\" profile. If there is none default values are taken" ) ); - m_transfer = new QAction( tr("Transfer file..."), Resource::loadPixmap("pass") , QString::null, - 0, this, 0 ); + m_transfer = new QAction( tr("Transfer file..."), Opie::Core::OResource::loadPixmap("pass", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); m_transfer->addTo( m_console ); connect(m_transfer, SIGNAL(activated() ), this, SLOT(slotTransfer() ) ); /* * immediate change of line wrap policy */ m_isWrapped = true; - m_wrap = new QAction( tr("Line wrap"), Resource::loadPixmap( "linewrap" ), QString::null, 0, this, 0, true ); + m_wrap = new QAction( tr("Line wrap"), Opie::Core::OResource::loadPixmap( "linewrap", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0, true ); m_wrap->addTo( m_console ); m_wrap->setOn( true ); connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) ); /* * fullscreen */ m_isFullscreen = false; - m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) - , QString::null, 0, this, 0 ); + m_fullscreen = new QAction( tr("Full screen"), Opie::Core::OResource::loadPixmap( "fullscreen", + Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); m_fullscreen->addTo( m_console ); connect( m_fullscreen, SIGNAL( activated() ), this, SLOT( slotFullscreen() ) ); m_console->insertSeparator(); @@ -208,13 +212,13 @@ void MainWindow::initUI() { /* * action that open/closes the keyboard */ m_openKeys = new QAction (tr("Open Keyboard..."), - Resource::loadPixmap( "console/keys/keyboard_icon" ), + Opie::Core::OResource::loadPixmap( "console/keys/keyboard_icon", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0); m_openKeys->setToggleAction(true); connect (m_openKeys, SIGNAL(toggled(bool)), this, SLOT(slotOpenKeb(bool))); /* insert the submenu */ m_console->insertItem(tr("New from Profile"), m_sessionsPop, @@ -241,20 +245,20 @@ void MainWindow::initUI() { m_kb = new FunctionKeyboard(m_keyBar); connect(m_kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)), this, SLOT(slotKeyReceived(FKey,ushort,ushort,bool))); a = new QAction(tr("Copy"), - Resource::loadPixmap("copy"), QString::null, + Opie::Core::OResource::loadPixmap("copy", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); //a->addTo( m_icons ); connect( a, SIGNAL(activated() ), this, SLOT(slotCopy() ) ); QAction *paste = new QAction(tr("Paste"), - Resource::loadPixmap("paste"), QString::null, + Opie::Core::OResource::loadPixmap("paste", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); connect( paste, SIGNAL(activated() ), this, SLOT(slotPaste() ) ); newCon->addTo( m_icons ); |