You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
941 B
49 lines
941 B
#ifndef __PIXMAP_H__
|
|
#define __PIXMAP_H__
|
|
|
|
|
|
#include <tqpixmap.h>
|
|
#include <tqdict.h>
|
|
#include <tqstring.h>
|
|
|
|
#include "kxkbconfig.h"
|
|
|
|
enum PixmapStyle {
|
|
PIXMAP_STYLE_NORMAL = 0,
|
|
PIXMAP_STYLE_INDICATOR = 1,
|
|
PIXMAP_STYLE_CONTEXTMENU = 2
|
|
};
|
|
|
|
class LayoutIcon {
|
|
|
|
private:
|
|
static LayoutIcon* instance;
|
|
static const TQString flagTemplate;
|
|
|
|
KxkbConfig m_kxkbConfig;
|
|
bool m_showFlag;
|
|
bool m_showLabel;
|
|
TQColor m_bgColor;
|
|
bool m_bgTransparent;
|
|
TQColor m_fgColor;
|
|
TQFont m_labelFont;
|
|
bool m_labelShadow;
|
|
TQColor m_shColor;
|
|
bool m_fitToBox;
|
|
|
|
TQDict<TQPixmap> m_pixmapCache;
|
|
|
|
LayoutIcon();
|
|
TQPixmap* createErrorPixmap();
|
|
void dimPixmap(TQPixmap& pixmap);
|
|
TQString getCountryFromLayoutName(const TQString& layoutName);
|
|
|
|
public:
|
|
static const TQString& ERROR_CODE;
|
|
|
|
static LayoutIcon& getInstance();
|
|
const TQPixmap& findPixmap(const TQString& code, int pixmapStyle, const TQString& displayName="");
|
|
};
|
|
|
|
#endif
|