summaryrefslogtreecommitdiff
authordrw <drw>2005-05-17 23:23:27 (UTC)
committer drw <drw>2005-05-17 23:23:27 (UTC)
commit73738d14ca541eaa41b8ee81168e98826752a98c (patch) (unidiff)
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 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "tableviewer.h" 21#include "tableviewer.h"
22#include "ui/tvbrowseview.h" 22#include "ui/tvbrowseview.h"
23#include "ui/tvfilterview.h" 23#include "ui/tvfilterview.h"
24#include "ui/tvlistview.h" 24#include "ui/tvlistview.h"
25#include "ui/tveditview.h" 25#include "ui/tveditview.h"
26#include "ui/tvkeyedit.h" 26#include "ui/tvkeyedit.h"
27#include "db/datacache.h" 27#include "db/datacache.h"
28 28
29/* OPIE */ 29/* OPIE */
30#include <opie2/odebug.h> 30#include <opie2/odebug.h>
31#include <opie2/oresource.h>
31#include <qpe/fileselector.h> 32#include <qpe/fileselector.h>
32#include <qpe/resource.h>
33using namespace Opie::Core; 33using namespace Opie::Core;
34 34
35/* QT */ 35/* QT */
36#include <qmenubar.h> 36#include <qmenubar.h>
37#include <qtoolbar.h> 37#include <qtoolbar.h>
38#include <qpopupmenu.h> 38#include <qpopupmenu.h>
39#include <qapplication.h> 39#include <qapplication.h>
40#include <qwidgetstack.h> 40#include <qwidgetstack.h>
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qbuffer.h> 42#include <qbuffer.h>
43 43
44/*! 44/*!
@@ -84,68 +84,61 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
84 edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot())); 84 edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot()));
85 edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot())); 85 edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot()));
86 menu->insertItem("Edit", edit_menu); 86 menu->insertItem("Edit", edit_menu);
87 87
88 QPopupMenu *view_menu = new QPopupMenu; 88 QPopupMenu *view_menu = new QPopupMenu;
89 view_menu->insertItem("Browse View", this, SLOT(browseViewSlot())); 89 view_menu->insertItem("Browse View", this, SLOT(browseViewSlot()));
90 view_menu->insertItem("List View", this, SLOT(listViewSlot())); 90 view_menu->insertItem("List View", this, SLOT(listViewSlot()));
91 menu->insertItem("View", view_menu); 91 menu->insertItem("View", view_menu);
92 92
93 QVBoxLayout *main_layout = new QVBoxLayout; 93 QVBoxLayout *main_layout = new QVBoxLayout;
94 94
95 /* Build tool bar */ 95 /* Build tool bar */
96 bool useBigIcon = qApp->desktop()->size().width() > 330;
97
96 navigation = new QToolBar(this, "navigation"); 98 navigation = new QToolBar(this, "navigation");
97 QToolButton *newItemButton = new QToolButton( 99 QToolButton *btn = new QToolButton( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon),
98 QIconSet(Resource::loadPixmap("new")), "New Item", QString::null, 100 "New Item", QString::null, this, SLOT(newItemSlot()), navigation, "New Item");
99 this, SLOT(newItemSlot()), navigation, "New Item"); 101 btn->setUsesBigPixmap( useBigIcon );
100 QToolButton *editItemButton = new QToolButton( 102 btn = new QToolButton( Opie::Core::OResource::loadPixmap("edit", Opie::Core::OResource::SmallIcon),
101 QIconSet(Resource::loadPixmap("edit")), "Edit Item", QString::null, 103 "Edit Item", QString::null, this, SLOT(editItemSlot()), navigation, "Edit Item");
102 this, SLOT(editItemSlot()), navigation, "Edit Item"); 104 btn->setUsesBigPixmap( useBigIcon );
103 QToolButton *deleteItemButton = new QToolButton( 105 btn = new QToolButton( Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon),
104 QIconSet(Resource::loadPixmap("trash")), "Delete Item", 106 "Delete Item", QString::null, this, SLOT(deleteItemSlot()), navigation, "Delete Item");
105 QString::null, this, 107 btn->setUsesBigPixmap( useBigIcon );
106 SLOT(deleteItemSlot()), navigation, "Delete Item");
107 108
108 navigation->addSeparator(); 109 navigation->addSeparator();
109 110
110 QToolButton *firstItemButton = new QToolButton( 111 btn = new QToolButton( Opie::Core::OResource::loadPixmap("fastback", Opie::Core::OResource::SmallIcon),
111 QIconSet(Resource::loadPixmap("fastback")), "First Item", 112 "First Item", QString::null, this, SLOT(firstItem()), navigation, "First Item");
112 QString::null, this, 113 btn->setUsesBigPixmap( useBigIcon );
113 SLOT(firstItem()), navigation, "First Item"); 114 btn = new QToolButton( Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon),
114 QToolButton *previousItemButton = new QToolButton( 115 "Previous Item", QString::null, this, SLOT(previousItem()), navigation, "Previous Item");
115 QIconSet(Resource::loadPixmap("back")), "Previous Item", 116 btn->setUsesBigPixmap( useBigIcon );
116 QString::null, this, 117 btn = new QToolButton( Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon),
117 SLOT(previousItem()), navigation, "Previous Item"); 118 "Next Item", QString::null, this, SLOT(nextItem()), navigation, "Next Item");
118 QToolButton *nextItemButton = new QToolButton( 119 btn->setUsesBigPixmap( useBigIcon );
119 QIconSet(Resource::loadPixmap("forward")), "Next Item", 120 btn = new QToolButton( Opie::Core::OResource::loadPixmap("fastforward", Opie::Core::OResource::SmallIcon),
120 QString::null, this, 121 "Last Item", QString::null, this, SLOT(lastItem()), navigation, "Last Item");
121 SLOT(nextItem()), navigation, "Next Item"); 122 btn->setUsesBigPixmap( useBigIcon );
122 QToolButton *lastItemButton = new QToolButton(
123 QIconSet(Resource::loadPixmap("fastforward")), "Last Item",
124 QString::null, this,
125 SLOT(lastItem()), navigation, "Last Item");
126 123
127 navigation->addSeparator(); 124 navigation->addSeparator();
128 QToolButton *browseButton = new QToolButton( 125 btn = new QToolButton( Opie::Core::OResource::loadPixmap("day", Opie::Core::OResource::SmallIcon),
129 QIconSet(Resource::loadPixmap("day")), "View Single Item", 126 "View Single Item", QString::null, this, SLOT(browseViewSlot()), navigation, "View Single Item");
130 QString::null, this, 127 btn->setUsesBigPixmap( useBigIcon );
131 SLOT(browseViewSlot()), navigation, "View Single Item"); 128 btn = new QToolButton( Opie::Core::OResource::loadPixmap("month", Opie::Core::OResource::SmallIcon),
132 QToolButton *listButton = new QToolButton( 129 "View Multiple Items", QString::null, this, SLOT(listViewSlot()), navigation, "View Multiple Items");
133 QIconSet(Resource::loadPixmap("month")), "View Multiple Items", 130 btn->setUsesBigPixmap( useBigIcon );
134 QString::null, this,
135 SLOT(listViewSlot()), navigation, "View Multiple Items");
136 131
137 setToolBarsMovable(FALSE); 132 setToolBarsMovable(FALSE);
138 setToolBarsMovable(FALSE);
139 setToolBarsMovable(FALSE);
140 133
141/* Build widgets */ 134/* Build widgets */
142 browseView = new TVBrowseView(&ts, this, 0); 135 browseView = new TVBrowseView(&ts, this, 0);
143 listView = new TVListView(&ts, this, 0); 136 listView = new TVListView(&ts, this, 0);
144 filterView = new TVFilterView(&ts, this, 0); 137 filterView = new TVFilterView(&ts, this, 0);
145 fileSelector = new FileSelector("text/csv;text/x-xml-tableviewer", 138 fileSelector = new FileSelector("text/csv;text/x-xml-tableviewer",
146 this, "fileselector"); 139 this, "fileselector");
147 fileSelector->setNewVisible(FALSE); 140 fileSelector->setNewVisible(FALSE);
148 fileSelector->setCloseVisible(FALSE); 141 fileSelector->setCloseVisible(FALSE);
149 142
150 cw = new QWidgetStack(this, 0); 143 cw = new QWidgetStack(this, 0);
151 cw->addWidget(listView, ListState); 144 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 @@
1#include <opie2/oresource.h>
2
3#include <qpe/qpeapplication.h>
4
1#include <qaction.h> 5#include <qaction.h>
2#include <qpopupmenu.h> 6#include <qpopupmenu.h>
3#include <qpushbutton.h> 7#include <qpushbutton.h>
4#include <qmessagebox.h> 8#include <qmessagebox.h>
5#include <qlistbox.h> 9#include <qlistbox.h>
6#include <qpe/qpeapplication.h>
7#include <qpe/resource.h>
8 10
9#include <assert.h> 11#include <assert.h>
10 12
11#include "kvnc.h" 13#include "kvnc.h"
12#include "krfbcanvas.h" 14#include "krfbcanvas.h"
13#include "krfbconnection.h" 15#include "krfbconnection.h"
14#include "kvncconndlg.h" 16#include "kvncconndlg.h"
15 17
16static int u_id = 1; 18static int u_id = 1;
17static int get_unique_id() 19static int get_unique_id()
18{ 20{
19 return u_id++; 21 return u_id++;
@@ -76,38 +78,38 @@ KVNC::KVNC( QWidget *parent, const char *name, WFlags ) : QMainWindow( parent,
76 cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); 78 cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) );
77 connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) ); 79 connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) );
78 canvas->setCornerWidget( cornerButton ); 80 canvas->setCornerWidget( cornerButton );
79 81
80 stack->raiseWidget( bookmarkSelector ); 82 stack->raiseWidget( bookmarkSelector );
81 83
82 84
83 bar= new QToolBar( this ); 85 bar= new QToolBar( this );
84 setToolBarsMovable( false ); 86 setToolBarsMovable( false );
85 setRightJustification(false); 87 setRightJustification(false);
86 88
87 89
88 QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ), 90 QAction *n = new QAction( tr( "New Connection" ), Opie::Core::OResource::loadPixmap( "new",
89 QString::null, 0, this, 0 ); 91 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
90 connect( n, SIGNAL( activated() ), 92 connect( n, SIGNAL( activated() ),
91 this, SLOT( newConnection() ) ); 93 this, SLOT( newConnection() ) );
92 n->addTo( bar ); 94 n->addTo( bar );
93 95
94 QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ), 96 QAction *o = new QAction( tr( "Open Bookmark" ), Opie::Core::OResource::loadPixmap( "fileopen",
95 QString::null, 0, this, 0 ); 97 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
96 connect( o, SIGNAL( activated() ), 98 connect( o, SIGNAL( activated() ),
97 this, SLOT( openConnection() ) ); 99 this, SLOT( openConnection() ) );
98 o->addTo( bar ); 100 o->addTo( bar );
99 101
100 QAction *d = new QAction( tr( "Delete Bookmark" ), Resource::loadPixmap( "trash" ), 102 QAction *d = new QAction( tr( "Delete Bookmark" ), Opie::Core::OResource::loadPixmap( "trash",
101 QString::null, 0, this, 0 ); 103 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
102 connect( d, SIGNAL( activated() ), 104 connect( d, SIGNAL( activated() ),
103 this, SLOT( deleteBookmark() ) ); 105 this, SLOT( deleteBookmark() ) );
104 d->addTo( bar ); 106 d->addTo( bar );
105} 107}
106 108
107KVNC::~KVNC() 109KVNC::~KVNC()
108{ 110{
109 111
110} 112}
111 113
112void KVNC::newConnection() 114void KVNC::newConnection()
113{ 115{