• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
kicontheme.h
1 /* vi: ts=8 sts=4 sw=4
2  *
3  * This file is part of the KDE project, module tdecore.
4  * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
5  * Antonio Larrosa <larrosa@kde.org>
6  *
7  * This is free software; it comes under the GNU Library General
8  * Public License, version 2. See the file "COPYING.LIB" for the
9  * exact licensing terms.
10  *
11  */
12 
13 #ifndef __TDEIconTheme_h_Included__
14 #define __TDEIconTheme_h_Included__
15 
16 #include <tqstring.h>
17 #include <tqstringlist.h>
18 #include <tqptrlist.h>
19 #include <tqvaluelist.h>
20 #include "tdelibs_export.h"
21 
22 class TDEConfig;
23 class TDEIconThemeDir;
24 
25 class TDEIconThemePrivate;
26 
27 class TDEIconPrivate;
28 
36 class TDECORE_EXPORT TDEIcon
37 {
38 public:
39  TDEIcon() { size = 0; }
40 
44  bool isValid() const { return size != 0; }
45 
49  enum Context {
50  Any,
51  Action,
52  Application,
53  Device,
54  FileSystem,
55  MimeType,
56  Animation,
57  Category,
58  Emblem,
59  Emote,
60  International,
61  Place,
62  StatusIcon
63  };
64 
68  enum Type {
69  Fixed,
70  Scalable,
71  Threshold
72  };
73 
77  enum MatchType {
78  MatchExact,
79  MatchBest
80 
81  };
82 
83  // if you add a group here, make sure to change the config reading in
84  // TDEIconLoader too
88  enum Group {
90  NoGroup=-1,
92  Desktop=0,
94  FirstGroup=0,
96  Toolbar,
98  MainToolbar,
100  Small,
102  Panel,
104  LastGroup,
106  User
107  };
108 
112  enum StdSizes {
114  SizeSmall=16,
116  SizeSmallMedium=22,
118  SizeMedium=32,
120  SizeLarge=48,
122  SizeHuge=64,
124  SizeEnormous=128
125  };
126 
130  enum States { DefaultState,
131  ActiveState,
132  DisabledState,
133  LastState
134  };
135 
141  enum Overlays {
142  LockOverlay=0x100,
143  ZipOverlay=0x200,
144  LinkOverlay=0x400,
145  HiddenOverlay=0x800,
146  ShareOverlay=0x1000,
147  OverlayMask = ~0xff
148  };
149 
153  int size;
154 
158  Context context;
159 
163  Type type;
164 
168  int threshold;
169 
173  TQString path;
174 
175 private:
176  TDEIconPrivate *d;
177 };
178 
179 inline TDEIcon::Group& operator++(TDEIcon::Group& group) { group = static_cast<TDEIcon::Group>(group+1); return group; }
180 inline TDEIcon::Group operator++(TDEIcon::Group& group,int) { TDEIcon::Group ret = group; ++group; return ret; }
181 
187 class TDECORE_EXPORT TDEIconTheme
188 {
189 public:
196  TDEIconTheme(const TQString& name, const TQString& appName=TQString::null);
197  ~TDEIconTheme();
198 
203  TQString name() const { return mName; }
204 
210  TQString description() const { return mDesc; }
211 
217  TQString example() const;
218 
223  TQString screenshot() const;
224 
229  TQString linkOverlay() const;
230 
235  TQString zipOverlay() const;
236 
241  TQString lockOverlay() const;
242 
248  TQString shareOverlay () const;
249 
254  TQString dir() const { return mDir; }
255 
260  TQStringList inherits() const { return mInherits; }
261 
266  bool isValid() const;
267 
273  bool isHidden() const;
274 
280  int depth() const { return mDepth; }
281 
287  int defaultSize(TDEIcon::Group group) const;
288 
294  TQValueList<int> querySizes(TDEIcon::Group group) const;
295 
302  TQStringList queryIcons(int size, TDEIcon::Context context = TDEIcon::Any) const;
303 
310  TQStringList queryIconsByContext(int size, TDEIcon::Context context = TDEIcon::Any) const;
311 
312 
323  TDEIcon iconPath(const TQString& name, int size, TDEIcon::MatchType match) const;
324 
329  bool hasContext( TDEIcon::Context context ) const;
330 
335  static TQStringList list();
336 
341  static TQString current();
342 
346  static void reconfigure();
347 
353  static TQString defaultThemeName();
354 
355 private:
356  int mDefSize[8];
357  TQValueList<int> mSizes[8];
358 
359  int mDepth;
360  TQString mDir, mName, mDesc;
361  TQStringList mInherits;
362  TQPtrList<TDEIconThemeDir> mDirs;
363  TDEIconThemePrivate *d;
364 
365  static TQString *_theme;
366  static TQStringList *_theme_list;
367 };
368 
369 #endif

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.