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.12 2002/03/04 00:51:46 lunakl Exp $"
00020
00021 #include <qfileinfo.h>
00022 #include <qpixmap.h>
00023 #include <qstring.h>
00024 #include <qwidget.h>
00025
00026 class QHBoxLayout;
00027 class QLabel;
00028 class KAuthIconPrivate;
00029
00044 class KAuthIcon : public QWidget
00045 {
00046 Q_OBJECT
00047
00048 public:
00052 KAuthIcon(QWidget *parent = 0, const char *name = 0);
00053 ~KAuthIcon();
00054
00055 virtual QSize sizeHint() const;
00059 virtual bool status() const = 0;
00060
00061 public slots:
00066 virtual void updateStatus() = 0;
00067
00068 signals:
00075 void authChanged(bool authorized);
00076
00077 protected:
00078 QHBoxLayout *layout;
00079
00080 QLabel *lockBox;
00081 QLabel *lockLabel;
00082 QPixmap lockPM;
00083 QPixmap openLockPM;
00084 QString lockText;
00085 QString openLockText;
00086
00087 protected:
00088 virtual void virtual_hook( int id, void* data );
00089 private:
00090 KAuthIconPrivate *d;
00091 };
00092
00093 class KRootPermsIconPrivate;
00099 class KRootPermsIcon : public KAuthIcon
00100 {
00101 Q_OBJECT
00102
00103 public:
00104 KRootPermsIcon(QWidget *parent = 0, const char *name = 0);
00105 ~KRootPermsIcon();
00106
00110 bool status() const { return root; }
00111
00112 public slots:
00113 void updateStatus();
00114
00115 protected:
00116 bool root;
00117
00118 protected:
00119 virtual void virtual_hook( int id, void* data );
00120 private:
00121 KRootPermsIconPrivate *d;
00122 };
00123
00124 class KWritePermsIconPrivate;
00131 class KWritePermsIcon : public KAuthIcon
00132 {
00133 Q_OBJECT
00134
00135 public:
00136 KWritePermsIcon(const QString & fileName, QWidget *parent = 0, const char *name = 0);
00137 ~KWritePermsIcon();
00141 bool status() const { return writable; }
00142
00147 void setFileName(const QString & fileName) { fi.setFile(fileName); updateStatus(); }
00148
00149 public slots:
00150 void updateStatus();
00151
00152 protected:
00153 bool writable;
00154 QFileInfo fi;
00155
00156 protected:
00157 virtual void virtual_hook( int id, void* data );
00158 private:
00159 KWritePermsIconPrivate *d;
00160 };
00161
00162 #endif
This file is part of the documentation for kdelibs Version 3.1.4.