summaryrefslogtreecommitdiff
authordrw <drw>2005-05-17 23:23:27 (UTC)
committer drw <drw>2005-05-17 23:23:27 (UTC)
commit73738d14ca541eaa41b8ee81168e98826752a98c (patch) (side-by-side diff)
treeee5bef46dcfbdee51f87716979e85577e34d8fae
parentf37c642f417a58ee489ab5a8bab56e5efb59bada (diff)
downloadopie-73738d14ca541eaa41b8ee81168e98826752a98c.zip
opie-73738d14ca541eaa41b8ee81168e98826752a98c.tar.gz
opie-73738d14ca541eaa41b8ee81168e98826752a98c.tar.bz2
Resource -> OResource
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp67
-rw-r--r--noncore/comm/keypebble/kvnc.cpp18
2 files changed, 40 insertions, 45 deletions
diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp
index 9538cb3..8668368 100644
--- a/noncore/apps/tableviewer/tableviewer.cpp
+++ b/noncore/apps/tableviewer/tableviewer.cpp
@@ -19,26 +19,26 @@
**********************************************************************/
#include "tableviewer.h"
#include "ui/tvbrowseview.h"
#include "ui/tvfilterview.h"
#include "ui/tvlistview.h"
#include "ui/tveditview.h"
#include "ui/tvkeyedit.h"
#include "db/datacache.h"
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qpe/fileselector.h>
-#include <qpe/resource.h>
using namespace Opie::Core;
/* QT */
#include <qmenubar.h>
#include <qtoolbar.h>
#include <qpopupmenu.h>
#include <qapplication.h>
#include <qwidgetstack.h>
#include <qlayout.h>
#include <qbuffer.h>
/*!
@@ -84,68 +84,61 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot()));
edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot()));
menu->insertItem("Edit", edit_menu);
QPopupMenu *view_menu = new QPopupMenu;
view_menu->insertItem("Browse View", this, SLOT(browseViewSlot()));
view_menu->insertItem("List View", this, SLOT(listViewSlot()));
menu->insertItem("View", view_menu);
QVBoxLayout *main_layout = new QVBoxLayout;
/* Build tool bar */
+ bool useBigIcon = qApp->desktop()->size().width() > 330;
+
navigation = new QToolBar(this, "navigation");
- QToolButton *newItemButton = new QToolButton(
- QIconSet(Resource::loadPixmap("new")), "New Item", QString::null,
- this, SLOT(newItemSlot()), navigation, "New Item");
- QToolButton *editItemButton = new QToolButton(
- QIconSet(Resource::loadPixmap("edit")), "Edit Item", QString::null,
- this, SLOT(editItemSlot()), navigation, "Edit Item");
- QToolButton *deleteItemButton = new QToolButton(
- QIconSet(Resource::loadPixmap("trash")), "Delete Item",
- QString::null, this,
- SLOT(deleteItemSlot()), navigation, "Delete Item");
+ QToolButton *btn = new QToolButton( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon),
+ "New Item", QString::null, this, SLOT(newItemSlot()), navigation, "New Item");
+ btn->setUsesBigPixmap( useBigIcon );
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("edit", Opie::Core::OResource::SmallIcon),
+ "Edit Item", QString::null, this, SLOT(editItemSlot()), navigation, "Edit Item");
+ btn->setUsesBigPixmap( useBigIcon );
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon),
+ "Delete Item", QString::null, this, SLOT(deleteItemSlot()), navigation, "Delete Item");
+ btn->setUsesBigPixmap( useBigIcon );
navigation->addSeparator();
- QToolButton *firstItemButton = new QToolButton(
- QIconSet(Resource::loadPixmap("fastback")), "First Item",
- QString::null, this,
- SLOT(firstItem()), navigation, "First Item");
- QToolButton *previousItemButton = new QToolButton(
- QIconSet(Resource::loadPixmap("back")), "Previous Item",
- QString::null, this,
- SLOT(previousItem()), navigation, "Previous Item");
- QToolButton *nextItemButton = new QToolButton(
- QIconSet(Resource::loadPixmap("forward")), "Next Item",
- QString::null, this,
- SLOT(nextItem()), navigation, "Next Item");
- QToolButton *lastItemButton = new QToolButton(
- QIconSet(Resource::loadPixmap("fastforward")), "Last Item",
- QString::null, this,
- SLOT(lastItem()), navigation, "Last Item");
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("fastback", Opie::Core::OResource::SmallIcon),
+ "First Item", QString::null, this, SLOT(firstItem()), navigation, "First Item");
+ btn->setUsesBigPixmap( useBigIcon );
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon),
+ "Previous Item", QString::null, this, SLOT(previousItem()), navigation, "Previous Item");
+ btn->setUsesBigPixmap( useBigIcon );
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon),
+ "Next Item", QString::null, this, SLOT(nextItem()), navigation, "Next Item");
+ btn->setUsesBigPixmap( useBigIcon );
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("fastforward", Opie::Core::OResource::SmallIcon),
+ "Last Item", QString::null, this, SLOT(lastItem()), navigation, "Last Item");
+ btn->setUsesBigPixmap( useBigIcon );
navigation->addSeparator();
- QToolButton *browseButton = new QToolButton(
- QIconSet(Resource::loadPixmap("day")), "View Single Item",
- QString::null, this,
- SLOT(browseViewSlot()), navigation, "View Single Item");
- QToolButton *listButton = new QToolButton(
- QIconSet(Resource::loadPixmap("month")), "View Multiple Items",
- QString::null, this,
- SLOT(listViewSlot()), navigation, "View Multiple Items");
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("day", Opie::Core::OResource::SmallIcon),
+ "View Single Item", QString::null, this, SLOT(browseViewSlot()), navigation, "View Single Item");
+ btn->setUsesBigPixmap( useBigIcon );
+ btn = new QToolButton( Opie::Core::OResource::loadPixmap("month", Opie::Core::OResource::SmallIcon),
+ "View Multiple Items", QString::null, this, SLOT(listViewSlot()), navigation, "View Multiple Items");
+ btn->setUsesBigPixmap( useBigIcon );
setToolBarsMovable(FALSE);
- setToolBarsMovable(FALSE);
- setToolBarsMovable(FALSE);
/* Build widgets */
browseView = new TVBrowseView(&ts, this, 0);
listView = new TVListView(&ts, this, 0);
filterView = new TVFilterView(&ts, this, 0);
fileSelector = new FileSelector("text/csv;text/x-xml-tableviewer",
this, "fileselector");
fileSelector->setNewVisible(FALSE);
fileSelector->setCloseVisible(FALSE);
cw = new QWidgetStack(this, 0);
cw->addWidget(listView, ListState);
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp
index 3a8e919..c089551 100644
--- a/noncore/comm/keypebble/kvnc.cpp
+++ b/noncore/comm/keypebble/kvnc.cpp
@@ -1,19 +1,21 @@
+#include <opie2/oresource.h>
+
+#include <qpe/qpeapplication.h>
+
#include <qaction.h>
#include <qpopupmenu.h>
#include <qpushbutton.h>
#include <qmessagebox.h>
#include <qlistbox.h>
-#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
#include <assert.h>
#include "kvnc.h"
#include "krfbcanvas.h"
#include "krfbconnection.h"
#include "kvncconndlg.h"
static int u_id = 1;
static int get_unique_id()
{
return u_id++;
@@ -76,38 +78,38 @@ KVNC::KVNC( QWidget *parent, const char *name, WFlags ) : QMainWindow( parent,
cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) );
connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) );
canvas->setCornerWidget( cornerButton );
stack->raiseWidget( bookmarkSelector );
bar= new QToolBar( this );
setToolBarsMovable( false );
setRightJustification(false);
- QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ),
- QString::null, 0, this, 0 );
+ QAction *n = new QAction( tr( "New Connection" ), Opie::Core::OResource::loadPixmap( "new",
+ Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
connect( n, SIGNAL( activated() ),
this, SLOT( newConnection() ) );
n->addTo( bar );
- QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ),
- QString::null, 0, this, 0 );
+ QAction *o = new QAction( tr( "Open Bookmark" ), Opie::Core::OResource::loadPixmap( "fileopen",
+ Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
connect( o, SIGNAL( activated() ),
this, SLOT( openConnection() ) );
o->addTo( bar );
- QAction *d = new QAction( tr( "Delete Bookmark" ), Resource::loadPixmap( "trash" ),
- QString::null, 0, this, 0 );
+ QAction *d = new QAction( tr( "Delete Bookmark" ), Opie::Core::OResource::loadPixmap( "trash",
+ Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
connect( d, SIGNAL( activated() ),
this, SLOT( deleteBookmark() ) );
d->addTo( bar );
}
KVNC::~KVNC()
{
}
void KVNC::newConnection()
{