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

tdeui

  • tdeui
kauthicon.h
1 /* This file is part of the KDE libraries
2  Copyright (c) 1999 Preston Brown <pbrown@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef _KAUTHICON_H
19 #define _KAUTHICON_H "$Id$"
20 
21 #include <tqfileinfo.h>
22 #include <tqpixmap.h>
23 #include <tqstring.h>
24 #include <tqwidget.h>
25 
26 #include <tdelibs_export.h>
27 
28 class TQHBoxLayout;
29 class TQLabel;
30 class KAuthIconPrivate;
31 
47 class TDEUI_EXPORT KAuthIcon : public TQWidget
48 {
49  Q_OBJECT
50 
51 public:
55  KAuthIcon(TQWidget *parent = 0, const char *name = 0);
56  ~KAuthIcon();
57 
58  virtual TQSize sizeHint() const;
62  virtual bool status() const = 0;
63 
64 public slots:
69  virtual void updateStatus() = 0;
70 
71 signals:
78  void authChanged(bool authorized);
79 
80 protected:
81  TQHBoxLayout *layout;
82 
83  TQLabel *lockBox;
84  TQLabel *lockLabel;
85  TQPixmap lockPM;
86  TQPixmap openLockPM;
87  TQString lockText;
88  TQString openLockText;
89 
90 protected:
91  virtual void virtual_hook( int id, void* data );
92 private:
93  KAuthIconPrivate *d;
94 };
95 
96 class KRootPermsIconPrivate;
103 class TDEUI_EXPORT KRootPermsIcon : public KAuthIcon
104 {
105  Q_OBJECT
106 
107 public:
108  KRootPermsIcon(TQWidget *parent = 0, const char *name = 0);
109  ~KRootPermsIcon();
110 
114  bool status() const { return root; }
115 
116 public slots:
117  void updateStatus();
118 
119 protected:
120  bool root;
121 
122 protected:
123  virtual void virtual_hook( int id, void* data );
124 private:
125  KRootPermsIconPrivate *d;
126 };
127 
128 class KWritePermsIconPrivate;
135 class TDEUI_EXPORT KWritePermsIcon : public KAuthIcon
136 {
137  Q_OBJECT
138  TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )
139 
140 public:
141  KWritePermsIcon(const TQString & fileName, TQWidget *parent = 0, const char *name = 0);
142  ~KWritePermsIcon();
146  bool status() const { return writable; }
147 
152  void setFileName(const TQString & fileName) { fi.setFile(fileName); updateStatus(); }
153 
158  TQString fileName() const { return fi.fileName(); }
159 
160 public slots:
161  void updateStatus();
162 
163 protected:
164  bool writable;
165  TQFileInfo fi;
166 
167 protected:
168  virtual void virtual_hook( int id, void* data );
169 private:
170  KWritePermsIconPrivate *d;
171 };
172 
173 #endif
KWritePermsIcon::status
bool status() const
Definition: kauthicon.h:146
KRootPermsIcon
Icon to show whether or not a user has root permissions.
Definition: kauthicon.h:103
KWritePermsIcon::setFileName
void setFileName(const TQString &fileName)
make the icon watch a new filename.
Definition: kauthicon.h:152
KWritePermsIcon
Auth icon for write permission display.
Definition: kauthicon.h:135
KAuthIcon::updateStatus
virtual void updateStatus()=0
Re-implement this method if you want the icon to update itself when something external has changed (i...
KWritePermsIcon::fileName
TQString fileName() const
return the filename of the currently watched file.
Definition: kauthicon.h:158
KAuthIcon
A base class for authorization icon widgets.
Definition: kauthicon.h:47
KRootPermsIcon::status
bool status() const
return whether or not the current user has root permissions.
Definition: kauthicon.h:114

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • 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 tdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.