summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-10 11:06:50 (UTC)
committer zecke <zecke>2004-09-10 11:06:50 (UTC)
commit00b7879d0d886b642b1f1102e3a811e67f928df7 (patch) (unidiff)
tree15a9a6b1ba3ddf64a94265556cd9140916a47811
parentd416ff23ea50303173d07ea243498a163f5995b5 (diff)
downloadopie-00b7879d0d886b642b1f1102e3a811e67f928df7.zip
opie-00b7879d0d886b642b1f1102e3a811e67f928df7.tar.gz
opie-00b7879d0d886b642b1f1102e3a811e67f928df7.tar.bz2
Fix warnings about unused parameters and no newline at the end of file
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp0
-rw-r--r--libopie2/opieui/ofontselector.cpp1
-rw-r--r--libopie2/opieui/olistview.cpp4
-rw-r--r--libopie2/opieui/oselector.cpp2
-rw-r--r--libopie2/opieui/owait.cpp1
5 files changed, 8 insertions, 0 deletions
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp
index de7f83f..9c9f7ec 100644
--- a/libopie2/opieui/big-screen/owidgetstack.cpp
+++ b/libopie2/opieui/big-screen/owidgetstack.cpp
diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp
index 6763ee6..4870cd9 100644
--- a/libopie2/opieui/ofontselector.cpp
+++ b/libopie2/opieui/ofontselector.cpp
@@ -172,48 +172,49 @@ OFontSelector::~OFontSelector()
172{ 172{
173 delete d; 173 delete d;
174} 174}
175 175
176/** 176/**
177 * This methods tries to set the font 177 * This methods tries to set the font
178 * @param f The wishes font 178 * @param f The wishes font
179 * @return success or failure 179 * @return success or failure
180 */ 180 */
181bool OFontSelector::setSelectedFont ( const QFont &f ) 181bool OFontSelector::setSelectedFont ( const QFont &f )
182{ 182{
183 return setSelectedFont ( f. family(), d->m_fdb. styleString ( f ), f. pointSize(), QFont::encodingName ( f. charSet())); 183 return setSelectedFont ( f. family(), d->m_fdb. styleString ( f ), f. pointSize(), QFont::encodingName ( f. charSet()));
184} 184}
185 185
186 186
187/** 187/**
188 * This is an overloaded method @see setSelectedFont 188 * This is an overloaded method @see setSelectedFont
189 * @param familyStr The family of the font 189 * @param familyStr The family of the font
190 * @param styleStr The style of the font 190 * @param styleStr The style of the font
191 * @param sizeVal The size of font 191 * @param sizeVal The size of font
192 * @param charset The charset to be used. Will be deprecated by QT3 192 * @param charset The charset to be used. Will be deprecated by QT3
193 */ 193 */
194bool OFontSelector::setSelectedFont( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset ) 194bool OFontSelector::setSelectedFont( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset )
195{ 195{
196 Q_CONST_UNUSED( charset )
196 QString sizeStr = QString::number ( sizeVal ); 197 QString sizeStr = QString::number ( sizeVal );
197 198
198 QListBoxItem *family = d->m_font_family_list->findItem ( familyStr ); 199 QListBoxItem *family = d->m_font_family_list->findItem ( familyStr );
199 if ( !family ) 200 if ( !family )
200 family = d->m_font_family_list->findItem ( "Helvetica" ); 201 family = d->m_font_family_list->findItem ( "Helvetica" );
201 if ( !family ) 202 if ( !family )
202 family = d->m_font_family_list->firstItem(); 203 family = d->m_font_family_list->firstItem();
203 d->m_font_family_list->setCurrentItem ( family ); 204 d->m_font_family_list->setCurrentItem ( family );
204 fontFamilyClicked ( d->m_font_family_list->index ( family )); 205 fontFamilyClicked ( d->m_font_family_list->index ( family ));
205 206
206 int style = findItemCB ( d->m_font_style_list, styleStr ); 207 int style = findItemCB ( d->m_font_style_list, styleStr );
207 if ( style < 0 ) 208 if ( style < 0 )
208 style = findItemCB ( d->m_font_style_list, "Regular" ); 209 style = findItemCB ( d->m_font_style_list, "Regular" );
209 if ( style < 0 && d->m_font_style_list->count() > 0 ) 210 if ( style < 0 && d->m_font_style_list->count() > 0 )
210 style = 0; 211 style = 0;
211 d->m_font_style_list->setCurrentItem ( style ); 212 d->m_font_style_list->setCurrentItem ( style );
212 fontStyleClicked ( style ); 213 fontStyleClicked ( style );
213 214
214 int size = findItemCB ( d->m_font_size_list, sizeStr ); 215 int size = findItemCB ( d->m_font_size_list, sizeStr );
215 if ( size < 0 ) 216 if ( size < 0 )
216 size = findItemCB ( d->m_font_size_list, "10" ); 217 size = findItemCB ( d->m_font_size_list, "10" );
217 if ( size < 0 && d->m_font_size_list->count() > 0 ) 218 if ( size < 0 && d->m_font_size_list->count() > 0 )
218 size = 0; 219 size = 0;
219 d->m_font_size_list->setCurrentItem ( size ); 220 d->m_font_size_list->setCurrentItem ( size );
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp
index b90c786..67b4b83 100644
--- a/libopie2/opieui/olistview.cpp
+++ b/libopie2/opieui/olistview.cpp
@@ -211,53 +211,55 @@ void OListView::expand()
211 odebug << "OListView::expand" << oendl; 211 odebug << "OListView::expand" << oendl;
212 212
213 QListViewItemIterator it( this ); 213 QListViewItemIterator it( this );
214 while ( it.current() ) { 214 while ( it.current() ) {
215 it.current()->setOpen( true ); 215 it.current()->setOpen( true );
216 ++it; 216 ++it;
217 } 217 }
218} 218}
219 219
220 220
221void OListView::collapse() 221void OListView::collapse()
222{ 222{
223 odebug << "OListView::collapse" << oendl; 223 odebug << "OListView::collapse" << oendl;
224 QListViewItemIterator it( this ); 224 QListViewItemIterator it( this );
225 while ( it.current() ) { 225 while ( it.current() ) {
226 it.current()->setOpen( false ); 226 it.current()->setOpen( false );
227 ++it; 227 ++it;
228 } 228 }
229} 229}
230 230
231 231
232QDataStream& operator<<( QDataStream& s, const OListView& lv ) 232QDataStream& operator<<( QDataStream& s, const OListView& lv )
233{ 233{
234 lv.serializeTo( s ); 234 lv.serializeTo( s );
235 return s;
235} 236}
236 237
237QDataStream& operator>>( QDataStream& s, OListView& lv ) 238QDataStream& operator>>( QDataStream& s, OListView& lv )
238{ 239{
239 lv.serializeFrom( s ); 240 lv.serializeFrom( s );
241 return s;
240} 242}
241#endif // QT_NO_DATASTREAM 243#endif // QT_NO_DATASTREAM
242 244
243/*====================================================================================== 245/*======================================================================================
244 * OListViewItem 246 * OListViewItem
245 *======================================================================================*/ 247 *======================================================================================*/
246 248
247OListViewItem::OListViewItem(QListView *parent) 249OListViewItem::OListViewItem(QListView *parent)
248 : QListViewItem(parent) 250 : QListViewItem(parent)
249{ 251{
250 init(); 252 init();
251} 253}
252 254
253 255
254OListViewItem::OListViewItem(QListViewItem *parent) 256OListViewItem::OListViewItem(QListViewItem *parent)
255 : QListViewItem(parent) 257 : QListViewItem(parent)
256{ 258{
257 init(); 259 init();
258} 260}
259 261
260 262
261OListViewItem::OListViewItem(QListView *parent, QListViewItem *after) 263OListViewItem::OListViewItem(QListView *parent, QListViewItem *after)
262 : QListViewItem(parent, after) 264 : QListViewItem(parent, after)
263{ 265{
@@ -442,54 +444,56 @@ void OListViewItem::serializeFrom( QDataStream& s )
442 { 444 {
443 QString coltext; 445 QString coltext;
444 s >> coltext; 446 s >> coltext;
445 odebug << "read text '" << coltext << "' for column " << i << "" << oendl; 447 odebug << "read text '" << coltext << "' for column " << i << "" << oendl;
446 setText( i, coltext ); 448 setText( i, coltext );
447 } 449 }
448 450
449 int items; 451 int items;
450 s >> items; 452 s >> items;
451 odebug << "read number of items = " << items << "" << oendl; 453 odebug << "read number of items = " << items << "" << oendl;
452 454
453 for ( int i = 0; i < items; ++i ) 455 for ( int i = 0; i < items; ++i )
454 { 456 {
455 OListViewItem* item = childFactory(); 457 OListViewItem* item = childFactory();
456 s >> (*item); 458 s >> (*item);
457 } 459 }
458 460
459 odebug << "OListViewItem loaded." << oendl; 461 odebug << "OListViewItem loaded." << oendl;
460} 462}
461 463
462 464
463QDataStream& operator<<( QDataStream& s, const OListViewItem& lvi ) 465QDataStream& operator<<( QDataStream& s, const OListViewItem& lvi )
464{ 466{
465 lvi.serializeTo( s ); 467 lvi.serializeTo( s );
468 return s;
466} 469}
467 470
468 471
469QDataStream& operator>>( QDataStream& s, OListViewItem& lvi ) 472QDataStream& operator>>( QDataStream& s, OListViewItem& lvi )
470{ 473{
471 lvi.serializeFrom( s ); 474 lvi.serializeFrom( s );
475 return s;
472} 476}
473#endif // QT_NO_DATASTREAM 477#endif // QT_NO_DATASTREAM
474 478
475 479
476/*====================================================================================== 480/*======================================================================================
477 * OCheckListItem 481 * OCheckListItem
478 *======================================================================================*/ 482 *======================================================================================*/
479 483
480OCheckListItem::OCheckListItem( QCheckListItem* parent, const QString& text, Type t ) 484OCheckListItem::OCheckListItem( QCheckListItem* parent, const QString& text, Type t )
481 :QCheckListItem( parent, text, t ) 485 :QCheckListItem( parent, text, t )
482{ 486{
483 init(); 487 init();
484} 488}
485 489
486 490
487OCheckListItem::OCheckListItem( QListViewItem* parent, const QString& text, Type t) 491OCheckListItem::OCheckListItem( QListViewItem* parent, const QString& text, Type t)
488 :QCheckListItem( parent, text, t ) 492 :QCheckListItem( parent, text, t )
489{ 493{
490 init(); 494 init();
491} 495}
492 496
493 497
494OCheckListItem::OCheckListItem( QListView* parent, const QString& text, Type t ) 498OCheckListItem::OCheckListItem( QListView* parent, const QString& text, Type t )
495 :QCheckListItem( parent, text, t ) 499 :QCheckListItem( parent, text, t )
diff --git a/libopie2/opieui/oselector.cpp b/libopie2/opieui/oselector.cpp
index 5f6f10f..05543c5 100644
--- a/libopie2/opieui/oselector.cpp
+++ b/libopie2/opieui/oselector.cpp
@@ -125,48 +125,50 @@ void OXYSelector::mousePressEvent( QMouseEvent *e )
125 valuesFromPosition( e->pos().x() - 2, e->pos().y() - 2, xVal, yVal ); 125 valuesFromPosition( e->pos().x() - 2, e->pos().y() - 2, xVal, yVal );
126 setValues( xVal, yVal ); 126 setValues( xVal, yVal );
127 127
128 emit valueChanged( xPos, yPos ); 128 emit valueChanged( xPos, yPos );
129} 129}
130 130
131void OXYSelector::mouseMoveEvent( QMouseEvent *e ) 131void OXYSelector::mouseMoveEvent( QMouseEvent *e )
132{ 132{
133 int xVal, yVal; 133 int xVal, yVal;
134 valuesFromPosition( e->pos().x() - 2, e->pos().y() - 2, xVal, yVal ); 134 valuesFromPosition( e->pos().x() - 2, e->pos().y() - 2, xVal, yVal );
135 setValues( xVal, yVal ); 135 setValues( xVal, yVal );
136 136
137 emit valueChanged( xPos, yPos ); 137 emit valueChanged( xPos, yPos );
138} 138}
139 139
140void OXYSelector::wheelEvent( QWheelEvent *e ) 140void OXYSelector::wheelEvent( QWheelEvent *e )
141{ 141{
142 #if QT_VERSION > 290 142 #if QT_VERSION > 290
143 if ( e->orientation() == Qt::Horizontal ) 143 if ( e->orientation() == Qt::Horizontal )
144 setValues( xValue() + e->delta()/120, yValue() ); 144 setValues( xValue() + e->delta()/120, yValue() );
145 else 145 else
146 setValues( xValue(), yValue() + e->delta()/120 ); 146 setValues( xValue(), yValue() + e->delta()/120 );
147 147
148 emit valueChanged( xPos, yPos ); 148 emit valueChanged( xPos, yPos );
149 #else
150 Q_UNUSED( e )
149 #endif 151 #endif
150} 152}
151 153
152void OXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const 154void OXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
153{ 155{
154 xVal = ( (maxX-minX) * (x-2) ) / ( width()-4 ); 156 xVal = ( (maxX-minX) * (x-2) ) / ( width()-4 );
155 yVal = maxY - ( ( (maxY-minY) * (y-2) ) / ( height()-4 ) ); 157 yVal = maxY - ( ( (maxY-minY) * (y-2) ) / ( height()-4 ) );
156 158
157 if ( xVal > maxX ) 159 if ( xVal > maxX )
158 xVal = maxX; 160 xVal = maxX;
159 else if ( xVal < minX ) 161 else if ( xVal < minX )
160 xVal = minX; 162 xVal = minX;
161 163
162 if ( yVal > maxY ) 164 if ( yVal > maxY )
163 yVal = maxY; 165 yVal = maxY;
164 else if ( yVal < minY ) 166 else if ( yVal < minY )
165 yVal = minY; 167 yVal = minY;
166} 168}
167 169
168void OXYSelector::setPosition( int xp, int yp ) 170void OXYSelector::setPosition( int xp, int yp )
169{ 171{
170 if ( xp < 2 ) 172 if ( xp < 2 )
171 xp = 2; 173 xp = 2;
172 else if ( xp > width() - 2 ) 174 else if ( xp > width() - 2 )
diff --git a/libopie2/opieui/owait.cpp b/libopie2/opieui/owait.cpp
index 9519888..ec1f25a 100644
--- a/libopie2/opieui/owait.cpp
+++ b/libopie2/opieui/owait.cpp
@@ -34,48 +34,49 @@
34#include <qpe/qpeapplication.h> 34#include <qpe/qpeapplication.h>
35#include <qpe/resource.h> 35#include <qpe/resource.h>
36 36
37/* QT */ 37/* QT */
38#include <qlayout.h> 38#include <qlayout.h>
39#include <qpainter.h> 39#include <qpainter.h>
40 40
41using namespace Opie::Ui; 41using namespace Opie::Ui;
42 42
43static int frame = 0; 43static int frame = 0;
44 44
45/** 45/**
46 * This will construct a modal dialog. 46 * This will construct a modal dialog.
47 * 47 *
48 * The default timer length is 10. 48 * The default timer length is 10.
49 * 49 *
50 * @param parent The parent of the widget 50 * @param parent The parent of the widget
51 * @param msg The name of the object 51 * @param msg The name of the object
52 * @param dispIcon Display Icon? 52 * @param dispIcon Display Icon?
53 */ 53 */
54OWait::OWait( QWidget *parent, const char* msg, bool dispIcon ) 54OWait::OWait( QWidget *parent, const char* msg, bool dispIcon )
55 :QDialog( parent, msg, TRUE, WStyle_Customize ) 55 :QDialog( parent, msg, TRUE, WStyle_Customize )
56{ 56{
57 57
58 Q_UNUSED( dispIcon )
58 59
59 QHBoxLayout * hbox = new QHBoxLayout( this ); 60 QHBoxLayout * hbox = new QHBoxLayout( this );
60 61
61 m_lb = new QLabel( this ); 62 m_lb = new QLabel( this );
62 m_lb->setBackgroundMode ( NoBackground ); 63 m_lb->setBackgroundMode ( NoBackground );
63 64
64 hbox->addWidget( m_lb ); 65 hbox->addWidget( m_lb );
65 hbox->activate(); 66 hbox->activate();
66 67
67 m_pix = Resource::loadPixmap( "BigBusy" ); 68 m_pix = Resource::loadPixmap( "BigBusy" );
68 m_aniSize = m_pix.height(); 69 m_aniSize = m_pix.height();
69 resize( m_aniSize, m_aniSize ); 70 resize( m_aniSize, m_aniSize );
70 71
71 m_timerLength = 10; 72 m_timerLength = 10;
72 73
73 m_waitTimer = new QTimer( this ); 74 m_waitTimer = new QTimer( this );
74 connect( m_waitTimer, SIGNAL( timeout() ), this, SLOT( hide() ) ); 75 connect( m_waitTimer, SIGNAL( timeout() ), this, SLOT( hide() ) );
75} 76}
76 77
77void OWait::timerEvent( QTimerEvent * ) 78void OWait::timerEvent( QTimerEvent * )
78{ 79{
79 frame = ( ++frame ) % 4; 80 frame = ( ++frame ) % 4;
80 repaint(); 81 repaint();
81} 82}