summaryrefslogtreecommitdiff
path: root/core/launcher/launcherview.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 6c7d487..71e8753 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -1,53 +1,56 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "launcherview.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/private/categories.h>
#include <qtopia/categoryselect.h>
#include <qtopia/mimetype.h>
#include <qtopia/resource.h>
-//#include <qtopia/private/palmtoprecord.h>
+using namespace Opie::Core;
+/* QT */
#include <qtimer.h>
#include <qfileinfo.h>
#include <qiconview.h>
#include <qobjectlist.h>
// These define how the busy icon is animated and highlighted
#define BRIGHTEN_BUSY_ICON
//#define ALPHA_FADE_BUSY_ICON
//#define USE_ANIMATED_BUSY_ICON_OVERLAY
#define BOUNCE_BUSY_ICON
class BgPixmap
{
public:
BgPixmap( const QPixmap &p ) : pm(p), ref(1) {}
QPixmap pm;
int ref;
};
static QMap<QString,BgPixmap*> *bgCache = 0;
@@ -94,49 +97,49 @@ private:
class LauncherIconView : public QIconView {
public:
LauncherIconView( QWidget* parent, const char* name=0 ) :
QIconView(parent,name),
tf(""),
cf(0),
bsy(0),
busyTimer(0),
bigIcns(TRUE),
bgColor(white)
{
sortmeth = Name;
hidden.setAutoDelete(TRUE);
ike = FALSE;
calculateGrid( Bottom );
}
~LauncherIconView()
{
#if 0 // debuggery
QListIterator<AppLnk> it(hidden);
AppLnk* l;
while ((l=it.current())) {
++it;
- //qDebug("%p: hidden (should remove)",l);
+ //odebug << "" << l << ": hidden (should remove)" << oendl;
}
#endif
}
QIconViewItem* busyItem() const { return bsy; }
#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
QPixmap busyPixmap() const { return busyPix; }
#endif
void setBigIcons( bool bi ) {
bigIcns = bi;
#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
busyPix.resize(0,0);
#endif
}
void updateCategoriesAndMimeTypes();
void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; }
void doAutoScroll()
{
// We don't want rubberbanding (yet)
}
void setBusy(bool on)
{
@@ -1008,49 +1011,49 @@ void LauncherView::setUpdatesEnabled( bool u )
void LauncherView::sort()
{
icons->sort();
}
void LauncherView::addItem(AppLnk* app, bool resort)
{
icons->addItem(app,resort);
}
void LauncherView::paletteChange( const QPalette &p )
{
icons->unsetPalette();
QVBox::paletteChange( p );
if ( bgType == Ruled )
setBackgroundType( Ruled, QString::null );
QColorGroup cg = icons->colorGroup();
cg.setColor( QColorGroup::Text, textCol );
icons->setPalette( QPalette(cg,cg,cg) );
}
void LauncherView::fontChanged(const QFont&)
{
- qDebug("LauncherView::fontChanged()");
+ odebug << "LauncherView::fontChanged()" << oendl;
icons->hideOrShowItems( FALSE );
}
void LauncherView::relayout(void)
{
icons->hideOrShowItems(FALSE);
}
void LauncherView::flushBgCache()
{
if ( !bgCache )
return;
// remove unreferenced backgrounds.
QMap<QString,BgPixmap*>::Iterator it = bgCache->begin();
while ( it != bgCache->end() ) {
QMap<QString,BgPixmap*>::Iterator curr = it;
++it;
if ( (*curr)->ref == 0 ) {
delete (*curr);
bgCache->remove( curr );
}
}
}