• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KIO

kpropertiesdialog_p.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
00003    Copyright (c) 1999, 2000 Preston Brown <pbrown@kde.org>
00004    Copyright (c) 2000 Simon Hausmann <hausmann@kde.org>
00005    Copyright (c) 2000 David Faure <faure@kde.org>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License as published by the Free Software Foundation; either
00010    version 2 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020    Boston, MA 02110-1301, USA.
00021 */
00022 
00023 /*
00024  * This file holds the definitions for all classes used to
00025  * display a properties dialog.
00026  */
00027 
00028 
00029 #ifndef KPROPERTIESDIALOGP_H
00030 #define KPROPERTIESDIALOGP_H
00031 
00032 
00033 #include "kpropertiesdialog.h"
00034 
00035 class KComboBox;
00036 class QComboBox;
00037 
00038 class Ui_KPropertiesDesktopBase;
00039 
00040 namespace KDEPrivate
00041 {
00042 
00048 class KFilePropsPlugin : public KPropertiesDialogPlugin
00049 {
00050   Q_OBJECT
00051 public:
00055   KFilePropsPlugin( KPropertiesDialog *_props );
00056   virtual ~KFilePropsPlugin();
00057 
00063   virtual void applyChanges();
00064 
00068   static bool supports( const KFileItemList& _items );
00069 
00073   void postApplyChanges();
00074 
00075   void setFileNameReadOnly( bool ro );
00076 
00077 protected Q_SLOTS:
00078   void slotEditFileType();
00079   void slotCopyFinished( KJob * );
00080   void slotFileRenamed( KIO::Job *, const KUrl &, const KUrl & );
00081   void slotDirSizeUpdate();
00082   void slotDirSizeFinished( KJob * );
00083   void slotFoundMountPoint( const QString& mp, quint64 kibSize,
00084                             quint64 kibUsed, quint64 kibAvail );
00085   void slotSizeStop();
00086   void slotSizeDetermine();
00087 
00088 Q_SIGNALS:
00089   void leaveModality();
00090 private Q_SLOTS:
00091   void nameFileChanged(const QString &text );
00092   void slotIconChanged();
00093 
00094 private:
00095   bool enableIconButton() const;
00096   void determineRelativePath( const QString & path );
00097   void applyIconChanges();
00098 
00099   class KFilePropsPluginPrivate;
00100   KFilePropsPluginPrivate* const d;
00101 };
00102 
00109 class KFilePermissionsPropsPlugin : public KPropertiesDialogPlugin
00110 {
00111   Q_OBJECT
00112 public:
00113   enum PermissionsMode {
00114     PermissionsOnlyFiles = 0,
00115     PermissionsOnlyDirs = 1,
00116     PermissionsOnlyLinks = 2,
00117     PermissionsMixed = 3
00118   };
00119 
00120   enum PermissionsTarget {
00121     PermissionsOwner  = 0,
00122     PermissionsGroup  = 1,
00123     PermissionsOthers = 2
00124   };
00125 
00129   KFilePermissionsPropsPlugin( KPropertiesDialog *_props );
00130   virtual ~KFilePermissionsPropsPlugin();
00131 
00132   virtual void applyChanges();
00133 
00137   static bool supports( const KFileItemList& _items );
00138 
00139 private Q_SLOTS:
00140 
00141   void slotChmodResult( KJob * );
00142   void slotShowAdvancedPermissions();
00143 
00144 Q_SIGNALS:
00145   void leaveModality();
00146 
00147 private:
00148   void setComboContent(QComboBox *combo, PermissionsTarget target,
00149                mode_t permissions, mode_t partial);
00150   bool isIrregular(mode_t permissions, bool isDir, bool isLink);
00151   void enableAccessControls(bool enable);
00152   void updateAccessControls();
00153   void getPermissionMasks(mode_t &andFilePermissions,
00154               mode_t &andDirPermissions,
00155               mode_t &orFilePermissions,
00156               mode_t &orDirPermissions);
00157 
00158   static const mode_t permissionsMasks[3];
00159   static const mode_t standardPermissions[4];
00160   static const char *permissionsTexts[4][4];
00161 
00162   static mode_t fperm[3][4];
00163 
00164   class KFilePermissionsPropsPluginPrivate;
00165   KFilePermissionsPropsPluginPrivate* const d;
00166 };
00167 
00168 
00177 class KUrlPropsPlugin : public KPropertiesDialogPlugin
00178 {
00179   Q_OBJECT
00180 public:
00184   KUrlPropsPlugin( KPropertiesDialog *_props );
00185   virtual ~KUrlPropsPlugin();
00186 
00187   virtual void applyChanges();
00188 
00189   static bool supports( const KFileItemList& _items );
00190 
00191 private:
00192   class KUrlPropsPluginPrivate;
00193   KUrlPropsPluginPrivate* const d;
00194 };
00195 
00196 
00201 class KDevicePropsPlugin : public KPropertiesDialogPlugin
00202 {
00203   Q_OBJECT
00204 public:
00205   KDevicePropsPlugin( KPropertiesDialog *_props );
00206   virtual ~KDevicePropsPlugin();
00207 
00208   virtual void applyChanges();
00209 
00210   static bool supports( const KFileItemList& _items );
00211 
00212 private Q_SLOTS:
00213   void slotActivated( int );
00214   void slotDeviceChanged();
00215   void slotFoundMountPoint( const QString& mp, quint64 kibSize,
00216                             quint64 kibUsed, quint64 kibAvail );
00217 
00218 private:
00219   void updateInfo();
00220 
00221 private:
00222   class KDevicePropsPluginPrivate;
00223   KDevicePropsPluginPrivate* const d;
00224 };
00225 
00234 class KDesktopPropsPlugin : public KPropertiesDialogPlugin
00235 {
00236   Q_OBJECT
00237 public:
00241   KDesktopPropsPlugin( KPropertiesDialog *_props );
00242   virtual ~KDesktopPropsPlugin();
00243 
00244   virtual void applyChanges();
00245 
00246   static bool supports( const KFileItemList& _items );
00247 
00248 public Q_SLOTS:
00249   void slotAddFiletype();
00250   void slotDelFiletype();
00251   void slotBrowseExec();
00252   void slotAdvanced();
00253 
00254 private:
00255   void checkCommandChanged();
00256 
00257 private:
00258   class KDesktopPropsPluginPrivate;
00259   KDesktopPropsPluginPrivate * const d;
00260 };
00261 
00262 }
00263 
00264 #endif

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal