summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp2
-rw-r--r--libopie2/opieui/ofontselector.cpp1
-rw-r--r--libopie2/opieui/olistview.cpp20
-rw-r--r--libopie2/opieui/oselector.cpp2
-rw-r--r--libopie2/opieui/owait.cpp1
5 files changed, 17 insertions, 9 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
@@ -429,13 +429,13 @@ void OWidgetStack::switchTop() {
m_mWidget->show();
}else
/* ### FIXME we need to place the widget better */
it.data()->reparent(0, WType_TopLevel, QPoint(10, 10) );
}
}
delete m_stack;
m_stack = 0;
}
}
-} \ No newline at end of file
+}
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
@@ -184,24 +184,25 @@ bool OFontSelector::setSelectedFont ( const QFont &f )
}
/**
* This is an overloaded method @see setSelectedFont
* @param familyStr The family of the font
* @param styleStr The style of the font
* @param sizeVal The size of font
* @param charset The charset to be used. Will be deprecated by QT3
*/
bool OFontSelector::setSelectedFont( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset )
{
+ Q_CONST_UNUSED( charset )
QString sizeStr = QString::number ( sizeVal );
QListBoxItem *family = d->m_font_family_list->findItem ( familyStr );
if ( !family )
family = d->m_font_family_list->findItem ( "Helvetica" );
if ( !family )
family = d->m_font_family_list->firstItem();
d->m_font_family_list->setCurrentItem ( family );
fontFamilyClicked ( d->m_font_family_list->index ( family ));
int style = findItemCB ( d->m_font_style_list, styleStr );
if ( style < 0 )
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
@@ -178,25 +178,25 @@ void OListView::serializeFrom( QDataStream& s )
odebug << "loading OListView..." << oendl;
int cols;
s >> cols;
odebug << "read number of columns = " << cols << oendl;
while ( columns() < cols ) addColumn( QString::null );
for ( int i = 0; i < cols; ++i )
{
QString coltext;
s >> coltext;
- odebug << "read text '" << coltext << "' for column " << i << "" << oendl;
+ odebug << "read text '" << coltext << "' for column " << i << "" << oendl;
setColumnText( i, coltext );
}
int items;
s >> items;
odebug << "read number of items = " << items << oendl;
for ( int i = 0; i < items; ++i )
{
OListViewItem* item = childFactory();
s >> *item;
}
@@ -223,29 +223,31 @@ void OListView::collapse()
odebug << "OListView::collapse" << oendl;
QListViewItemIterator it( this );
while ( it.current() ) {
it.current()->setOpen( false );
++it;
}
}
QDataStream& operator<<( QDataStream& s, const OListView& lv )
{
lv.serializeTo( s );
+ return s;
}
QDataStream& operator>>( QDataStream& s, OListView& lv )
{
lv.serializeFrom( s );
+ return s;
}
#endif // QT_NO_DATASTREAM
/*======================================================================================
* OListViewItem
*======================================================================================*/
OListViewItem::OListViewItem(QListView *parent)
: QListViewItem(parent)
{
init();
}
@@ -433,51 +435,53 @@ void OListViewItem::serializeTo( QDataStream& s ) const
}
void OListViewItem::serializeFrom( QDataStream& s )
{
#warning Caution... the binary format is still under construction...
odebug << "loading OListViewItem..." << oendl;
for ( int i = 0; i < listView()->columns(); ++i )
{
QString coltext;
s >> coltext;
- odebug << "read text '" << coltext << "' for column " << i << "" << oendl;
+ odebug << "read text '" << coltext << "' for column " << i << "" << oendl;
setText( i, coltext );
}
int items;
s >> items;
- odebug << "read number of items = " << items << "" << oendl;
+ odebug << "read number of items = " << items << "" << oendl;
for ( int i = 0; i < items; ++i )
{
OListViewItem* item = childFactory();
s >> (*item);
}
odebug << "OListViewItem loaded." << oendl;
}
QDataStream& operator<<( QDataStream& s, const OListViewItem& lvi )
{
lvi.serializeTo( s );
+ return s;
}
QDataStream& operator>>( QDataStream& s, OListViewItem& lvi )
{
lvi.serializeFrom( s );
+ return s;
}
#endif // QT_NO_DATASTREAM
/*======================================================================================
* OCheckListItem
*======================================================================================*/
OCheckListItem::OCheckListItem( QCheckListItem* parent, const QString& text, Type t )
:QCheckListItem( parent, text, t )
{
init();
@@ -606,25 +610,25 @@ ONamedListView::ONamedListView( QWidget *parent, const char *name )
}
ONamedListView::~ONamedListView()
{
}
void ONamedListView::addColumns( const QStringList& columns )
{
for ( QStringList::ConstIterator it = columns.begin(); it != columns.end(); ++it )
{
- odebug << "adding column " << *it << "" << oendl;
+ odebug << "adding column " << *it << "" << oendl;
addColumn( *it );
}
}
int ONamedListView::findColumn( const QString& text ) const
{
//FIXME: If used excessively, this will slow down performance of updates
//FIXME: because of the linear search over all column texts.
//FIXME: I will optimize later by using a hash map.
for ( int i = 0; i < columns(); ++i )
if ( columnText( i ) == text )
@@ -635,29 +639,29 @@ int ONamedListView::findColumn( const QString& text ) const
ONamedListViewItem* ONamedListView::find( int column, const QString& text, int recurse ) const
{
return find( (ONamedListViewItem*) firstChild(), column, text, recurse );
}
ONamedListViewItem* ONamedListView::find( ONamedListViewItem* item, int column, const QString& text, int recurse ) const
{
ONamedListViewItem* result;
while ( item && item->text( column ) != text )
{
- odebug << "checked " << item->text( column ) << "" << oendl;
+ odebug << "checked " << item->text( column ) << "" << oendl;
if ( recurse < 0 || recurse > 0 )
{
- odebug << "recursion is " << recurse << " - recursing into..." << oendl;
+ odebug << "recursion is " << recurse << " - recursing into..." << oendl;
result = find( (ONamedListViewItem*) item->firstChild(), column, text, recurse-1 );
if ( result ) return result;
}
item = (ONamedListViewItem*) item->itemBelow();
}
if ( item && item->text( column ) == text )
return item;
else
return 0;
}
@@ -716,41 +720,41 @@ ONamedListViewItem::ONamedListViewItem( QListViewItem* parent, QListViewItem* af
ONamedListViewItem::~ONamedListViewItem()
{
}
void ONamedListViewItem::setText( const QStringList& texts )
{
int col = 0;
for ( QStringList::ConstIterator it = texts.begin(); it != texts.end(); ++it )
{
- odebug << "setting column " << col << " = text " << *it << "" << oendl;
+ odebug << "setting column " << col << " = text " << *it << "" << oendl;
OListViewItem::setText( col++, *it );
}
}
void ONamedListViewItem::setText( const QString& column, const QString& text )
{
//FIXME: If used excessively, this will slow down performance of updates
//FIXME: because of the linear search over all column texts.
//FIXME: I will optimize later by using a hash map.
int col = ( (ONamedListView*) listView() )->findColumn( column );
if ( col != -1 )
OListViewItem::setText( col, text );
else
- owarn << "ONamedListViewItem::setText(): Warning! Columntext '" << column << "' not found." << oendl;
+ owarn << "ONamedListViewItem::setText(): Warning! Columntext '" << column << "' not found." << oendl;
}
ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const
{
return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse );
}
ONamedListViewItem* ONamedListViewItem::find( const QString& column, const QString& text, int recurse ) const
{
int col = ( (ONamedListView*) listView() )->findColumn( column );
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
@@ -137,24 +137,26 @@ void OXYSelector::mouseMoveEvent( QMouseEvent *e )
emit valueChanged( xPos, yPos );
}
void OXYSelector::wheelEvent( QWheelEvent *e )
{
#if QT_VERSION > 290
if ( e->orientation() == Qt::Horizontal )
setValues( xValue() + e->delta()/120, yValue() );
else
setValues( xValue(), yValue() + e->delta()/120 );
emit valueChanged( xPos, yPos );
+ #else
+ Q_UNUSED( e )
#endif
}
void OXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
{
xVal = ( (maxX-minX) * (x-2) ) / ( width()-4 );
yVal = maxY - ( ( (maxY-minY) * (y-2) ) / ( height()-4 ) );
if ( xVal > maxX )
xVal = maxX;
else if ( xVal < minX )
xVal = minX;
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
@@ -46,24 +46,25 @@ static int frame = 0;
* This will construct a modal dialog.
*
* The default timer length is 10.
*
* @param parent The parent of the widget
* @param msg The name of the object
* @param dispIcon Display Icon?
*/
OWait::OWait( QWidget *parent, const char* msg, bool dispIcon )
:QDialog( parent, msg, TRUE, WStyle_Customize )
{
+ Q_UNUSED( dispIcon )
QHBoxLayout * hbox = new QHBoxLayout( this );
m_lb = new QLabel( this );
m_lb->setBackgroundMode ( NoBackground );
hbox->addWidget( m_lb );
hbox->activate();
m_pix = Resource::loadPixmap( "BigBusy" );
m_aniSize = m_pix.height();
resize( m_aniSize, m_aniSize );