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

tdecore

  • tdecore
kicontheme.h
1 /*
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
TDEConfig
Access KDE Configuration entries.
Definition: tdeconfig.h:43
TDEIcon::isValid
bool isValid() const
Return true if this icon is valid, false otherwise.
Definition: kicontheme.h:44
TDEIconTheme::description
TQString description() const
A description for the icon theme.
Definition: kicontheme.h:210
TDEIcon::path
TQString path
The full path of the icon.
Definition: kicontheme.h:173
TDEIcon::Panel
Panel (Kicker) icons.
Definition: kicontheme.h:102
TDEIconTheme::inherits
TQStringList inherits() const
The themes this icon theme falls back on.
Definition: kicontheme.h:260
TDEIcon::Action
An action icon (e.g. 'save', 'print').
Definition: kicontheme.h:51
TDEIcon::Device
An icon that represents a device.
Definition: kicontheme.h:53
TDEIcon::Animation
An icon that is animated.
Definition: kicontheme.h:56
TDEIcon::Overlays
Overlays
This defines an overlay, a semi-transparent image that is projected onto the icon.
Definition: kicontheme.h:141
TDEIcon::Scalable
Scalable-size icon.
Definition: kicontheme.h:70
TDEIcon::MatchExact
Only try to find an exact match.
Definition: kicontheme.h:78
TDEIcon::Emblem
An icon that adds information to an existing icon.
Definition: kicontheme.h:58
TDEIcon::Type
Type
The type of the icon.
Definition: kicontheme.h:68
TDEIcon::StdSizes
StdSizes
These are the standard sizes for icons.
Definition: kicontheme.h:112
TDEIcon::Category
An icon that represents a category.
Definition: kicontheme.h:57
TDEIconTheme
Class to use/access icon themes in KDE.
Definition: kicontheme.h:187
TDEIcon::Context
Context
Defines the context of the icon.
Definition: kicontheme.h:49
TDEIcon::MainToolbar
Main toolbar icons.
Definition: kicontheme.h:98
TDEIcon::MatchType
MatchType
The type of a match.
Definition: kicontheme.h:77
TDEIcon
One icon as found by TDEIconTheme.
Definition: kicontheme.h:36
TDEIcon::Place
An icon that represents a location (e.g. 'home', 'trash').
Definition: kicontheme.h:61
TDEIcon::International
An icon that represents a country's flag.
Definition: kicontheme.h:60
TDEIcon::LastGroup
Last group.
Definition: kicontheme.h:104
TDEIcon::FileSystem
An icon that represents a file system.
Definition: kicontheme.h:54
TDEIcon::Small
Small icons.
Definition: kicontheme.h:100
TDEIcon::ActiveState
Icon is active.
Definition: kicontheme.h:131
TDEIconTheme::depth
int depth() const
The minimum display depth required for this theme.
Definition: kicontheme.h:280
TDEIcon::Any
Some icon with unknown purpose.
Definition: kicontheme.h:50
TDEIcon::type
Type type
The type of the icon: Fixed, Scalable or Threshold.
Definition: kicontheme.h:163
TDEIcon::DisabledState
Icon is disabled.
Definition: kicontheme.h:132
TDEIcon::Group
Group
The group of the icon.
Definition: kicontheme.h:88
TDEIcon::context
Context context
The context of the icon.
Definition: kicontheme.h:158
TDEIcon::Fixed
Fixed-size icon.
Definition: kicontheme.h:69
TDEIcon::Toolbar
Toolbar icons.
Definition: kicontheme.h:96
TDEIcon::threshold
int threshold
The threshold in case type == Threshold.
Definition: kicontheme.h:168
TDEIcon::size
int size
The size in pixels of the icon.
Definition: kicontheme.h:153
TDEIcon::Emote
An icon that expresses an emotion.
Definition: kicontheme.h:59
TDEIcon::Application
An icon that represents an application.
Definition: kicontheme.h:52
TDEIconTheme::dir
TQString dir() const
Returns the toplevel theme directory.
Definition: kicontheme.h:254
TDEIcon::MimeType
An icon that represents a mime type (or file type).
Definition: kicontheme.h:55
TDEIconTheme::name
TQString name() const
The stylized name of the icon theme.
Definition: kicontheme.h:203
TDEIcon::States
States
Defines the possible states of an icon.
Definition: kicontheme.h:130

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.