• 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
28class TQHBoxLayout;
29class TQLabel;
30class KAuthIconPrivate;
31
47class TDEUI_EXPORT KAuthIcon : public TQWidget
48{
49 TQ_OBJECT
50
51public:
55 KAuthIcon(TQWidget *parent = 0, const char *name = 0);
56 ~KAuthIcon();
57
58 virtual TQSize sizeHint() const;
62 virtual bool status() const = 0;
63
64public slots:
69 virtual void updateStatus() = 0;
70
71signals:
78 void authChanged(bool authorized);
79
80protected:
81 TQHBoxLayout *layout;
82
83 TQLabel *lockBox;
84 TQLabel *lockLabel;
85 TQPixmap lockPM;
86 TQPixmap openLockPM;
87 TQString lockText;
88 TQString openLockText;
89
90protected:
91 virtual void virtual_hook( int id, void* data );
92private:
93 KAuthIconPrivate *d;
94};
95
96class KRootPermsIconPrivate;
103class TDEUI_EXPORT KRootPermsIcon : public KAuthIcon
104{
105 TQ_OBJECT
106
107public:
108 KRootPermsIcon(TQWidget *parent = 0, const char *name = 0);
109 ~KRootPermsIcon();
110
114 bool status() const { return root; }
115
116public slots:
117 void updateStatus();
118
119protected:
120 bool root;
121
122protected:
123 virtual void virtual_hook( int id, void* data );
124private:
125 KRootPermsIconPrivate *d;
126};
127
128class KWritePermsIconPrivate;
135class TDEUI_EXPORT KWritePermsIcon : public KAuthIcon
136{
137 TQ_OBJECT
138 TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )
139
140public:
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
160public slots:
161 void updateStatus();
162
163protected:
164 bool writable;
165 TQFileInfo fi;
166
167protected:
168 virtual void virtual_hook( int id, void* data );
169private:
170 KWritePermsIconPrivate *d;
171};
172
173#endif
KAuthIcon
A base class for authorization icon widgets.
Definition: kauthicon.h:48
KAuthIcon::authChanged
void authChanged(bool authorized)
this signal is emitted when authorization has changed from its previous state.
KAuthIcon::status
virtual bool status() const =0
return the status of whatever is being monitored.
KAuthIcon::updateStatus
virtual void updateStatus()=0
Re-implement this method if you want the icon to update itself when something external has changed (i...
KRootPermsIcon
Icon to show whether or not a user has root permissions.
Definition: kauthicon.h:104
KRootPermsIcon::status
bool status() const
return whether or not the current user has root permissions.
Definition: kauthicon.h:114
KWritePermsIcon
Auth icon for write permission display.
Definition: kauthicon.h:136
KWritePermsIcon::status
bool status() const
Definition: kauthicon.h:146
KWritePermsIcon::fileName
TQString fileName() const
return the filename of the currently watched file.
Definition: kauthicon.h:158
KWritePermsIcon::setFileName
void setFileName(const TQString &fileName)
make the icon watch a new filename.
Definition: kauthicon.h:152

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.