|
|
|
/***************************************************************************
|
|
|
|
item.h - description
|
|
|
|
-------------------
|
|
|
|
begin : Fri May 23 2003
|
|
|
|
copyright : (C) 2003 by KoolDock team
|
|
|
|
email :
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef ITEM_H
|
|
|
|
#define ITEM_H
|
|
|
|
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kwin.h>
|
|
|
|
|
|
|
|
#include <qstring.h>
|
|
|
|
#include <qpixmap.h>
|
|
|
|
#include <qptrlist.h>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <qevent.h>
|
|
|
|
#include <qnamespace.h>
|
|
|
|
|
|
|
|
const int MAX_LEN = 256;
|
|
|
|
const int SIZE_INC = 1;
|
|
|
|
|
|
|
|
class Item
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Item(const QString& iconName, const QString& cmd, const QString& name, int minSize, int maxSize);
|
|
|
|
Item(const QString& fileName, int minSize, int maxSize);
|
|
|
|
Item(const QPixmap& iconBig, WId id, const QString& name, int minSize, int maxSize, bool wi =FALSE);
|
|
|
|
~Item();
|
|
|
|
|
|
|
|
void setIcon(const QPixmap& iconBig);
|
|
|
|
|
|
|
|
QPixmap* getIcon(int size);
|
|
|
|
QString getCommand();
|
|
|
|
QString getName();
|
|
|
|
QCString getClass();
|
|
|
|
int getCount();
|
|
|
|
int getIndex();
|
|
|
|
int getMIndex();
|
|
|
|
WId getId();
|
|
|
|
KWin::WindowInfo info;
|
|
|
|
void setId(WId newId);
|
|
|
|
QString getFilename();
|
|
|
|
|
|
|
|
void setName(const QString& newName);
|
|
|
|
void setClass(const QCString& newClass);
|
|
|
|
void setCount(int newCount);
|
|
|
|
void setIndex(int newIndex);
|
|
|
|
void setMIndex(int newIndex);
|
|
|
|
bool animed;
|
|
|
|
bool isAnimed();
|
|
|
|
void anim(bool param);
|
|
|
|
QPtrList<QPixmap> icons;
|
|
|
|
bool wIcon;
|
|
|
|
|
|
|
|
private:
|
|
|
|
KIconLoader *iLoader;
|
|
|
|
|
|
|
|
int minSize;
|
|
|
|
int maxSize;
|
|
|
|
QString command;
|
|
|
|
QString name;
|
|
|
|
QCString mClass;
|
|
|
|
int mCount;
|
|
|
|
int mIndex;
|
|
|
|
int mMIndex;
|
|
|
|
QString iconName;
|
|
|
|
QString filename;
|
|
|
|
WId id;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|