summaryrefslogtreecommitdiffabout
path: root/microkde/kglobal.h
authorulf69 <ulf69>2004-08-11 01:55:03 (UTC)
committer ulf69 <ulf69>2004-08-11 01:55:03 (UTC)
commit1f7c51ec14521aedd2e8838f1760cdd5eb3ed08a (patch) (side-by-side diff)
tree1391f8e0d48b925116051c2efbdea4fdf50556f2 /microkde/kglobal.h
parent02d51ae409a353d3a79e976c26ccc1f652e55de8 (diff)
downloadkdepimpi-1f7c51ec14521aedd2e8838f1760cdd5eb3ed08a.zip
kdepimpi-1f7c51ec14521aedd2e8838f1760cdd5eb3ed08a.tar.gz
kdepimpi-1f7c51ec14521aedd2e8838f1760cdd5eb3ed08a.tar.bz2
assign values to the size enums
to allow comparisons
Diffstat (limited to 'microkde/kglobal.h') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kglobal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/kglobal.h b/microkde/kglobal.h
index 1e03bea..a6c2527 100644
--- a/microkde/kglobal.h
+++ b/microkde/kglobal.h
@@ -1,68 +1,68 @@
#ifndef MINIKDE_KGLOBAL_H
#define MINIKDE_KGLOBAL_H
#include "klocale.h"
#include "kconfig.h"
#include "kiconloader.h"
#include <kstandarddirs.h>
#include <qevent.h>
class KStandardDirs;
class KGlobal {
public:
static KLocale *locale();
static KConfig *config();
static KIconLoader *iconLoader();
static KStandardDirs *dirs();
static int knumkeykonv( int );
static void setAppName( const QString & );
static QString formatMessage( QString mess, int maxlen ) ;
//US begin: added the following methods for convenience
static QString getAppName();
static void setLocale(KLocale *);
enum Orientation { Portrait, Landscape };
- enum Size { Small, Medium, Desktop };
+ enum Size { Small = 0, Medium = 1, Desktop = 2};
static int getDesktopWidth();
static int getDesktopHeight();
static KGlobal::Size getDesktopSize();
static KGlobal::Orientation getOrientation();
private:
static KLocale *mLocale;
static KConfig *mConfig;
static KIconLoader *mIconLoader;
static KStandardDirs *mDirs;
static QString mAppName;
};
/** @ref KGlobal
* A typesafe function to find the minimum of the two arguments.
*/
#define KMIN(a,b) kMin(a,b)
/** @ref KGlobal
* A typesafe function to find the maximum of the two arguments.
*/
#define KMAX(a,b) kMax(a,b)
/** @ref KGlobal
* A typesafe function to determine the absolute value of the argument.
*/
#define KABS(a) kAbs(a)
template<class T>
inline const T& kMin (const T& a, const T& b) { return a < b ? a : b; }
template<class T>
inline const T& kMax (const T& a, const T& b) { return b < a ? a : b; }
template<class T>
inline T kAbs (const T& a) { return a < 0 ? -a : a; }
#endif