-rw-r--r-- | noncore/apps/tableviewer/tableviewer.cpp | 67 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvnc.cpp | 18 |
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 | |||
@@ -25,14 +25,14 @@ | |||
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> | ||
33 | using namespace Opie::Core; | 33 | using 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> |
@@ -90,56 +90,49 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f | |||
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", |
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,13 +1,15 @@ | |||
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" |
@@ -82,26 +84,26 @@ KVNC::KVNC( QWidget *parent, const char *name, WFlags ) : QMainWindow( parent, | |||
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 | ||
107 | KVNC::~KVNC() | 109 | KVNC::~KVNC() |