kauthicon.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _KAUTHICON_H
00019 #define _KAUTHICON_H "$Id: kauthicon.h,v 1.18 2004/10/10 10:36:39 bhards Exp $"
00020
00021 #include <qfileinfo.h>
00022 #include <qpixmap.h>
00023 #include <qstring.h>
00024 #include <qwidget.h>
00025
00026 #include <kdelibs_export.h>
00027
00028 class QHBoxLayout;
00029 class QLabel;
00030 class KAuthIconPrivate;
00031
00047 class KDEUI_EXPORT KAuthIcon : public QWidget
00048 {
00049 Q_OBJECT
00050
00051 public:
00055 KAuthIcon(QWidget *parent = 0, const char *name = 0);
00056 ~KAuthIcon();
00057
00058 virtual QSize sizeHint() const;
00062 virtual bool status() const = 0;
00063
00064 public slots:
00069 virtual void updateStatus() = 0;
00070
00071 signals:
00078 void authChanged(bool authorized);
00079
00080 protected:
00081 QHBoxLayout *layout;
00082
00083 QLabel *lockBox;
00084 QLabel *lockLabel;
00085 QPixmap lockPM;
00086 QPixmap openLockPM;
00087 QString lockText;
00088 QString openLockText;
00089
00090 protected:
00091 virtual void virtual_hook( int id, void* data );
00092 private:
00093 KAuthIconPrivate *d;
00094 };
00095
00096 class KRootPermsIconPrivate;
00103 class KDEUI_EXPORT KRootPermsIcon : public KAuthIcon
00104 {
00105 Q_OBJECT
00106
00107 public:
00108 KRootPermsIcon(QWidget *parent = 0, const char *name = 0);
00109 ~KRootPermsIcon();
00110
00114 bool status() const { return root; }
00115
00116 public slots:
00117 void updateStatus();
00118
00119 protected:
00120 bool root;
00121
00122 protected:
00123 virtual void virtual_hook( int id, void* data );
00124 private:
00125 KRootPermsIconPrivate *d;
00126 };
00127
00128 class KWritePermsIconPrivate;
00135 class KDEUI_EXPORT KWritePermsIcon : public KAuthIcon
00136 {
00137 Q_OBJECT
00138
00139 public:
00140 KWritePermsIcon(const QString & fileName, QWidget *parent = 0, const char *name = 0);
00141 ~KWritePermsIcon();
00145 bool status() const { return writable; }
00146
00151 void setFileName(const QString & fileName) { fi.setFile(fileName); updateStatus(); }
00152
00153 public slots:
00154 void updateStatus();
00155
00156 protected:
00157 bool writable;
00158 QFileInfo fi;
00159
00160 protected:
00161 virtual void virtual_hook( int id, void* data );
00162 private:
00163 KWritePermsIconPrivate *d;
00164 };
00165
00166 #endif
This file is part of the documentation for kdeui Library Version 3.3.90.