| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kauthicon.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (c) 1999 Preston Brown <pbrown@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    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.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:56:12 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001