32 #include <tqptrlist.h>
34 #include <tdemacros.h>
36 #include <tdefileitem.h>
37 #include <kdialogbase.h>
49 #define KPropsPage KPropsDlgPlugin
51 namespace TDEIO {
class Job; }
82 static bool canDisplay( KFileItemList _items );
98 TQWidget* parent = 0L,
const char* name = 0L,
99 bool modal =
false,
bool autoShow =
true);
116 TQWidget *parent = 0L,
const char* name = 0L,
117 bool modal =
false,
bool autoShow =
true);
119 #ifndef KDE_NO_COMPAT
131 TQWidget* parent = 0L,
const char* name = 0L,
132 bool modal =
false,
bool autoShow =
true) TDE_DEPRECATED;
153 TQWidget* parent = 0L,
const char* name = 0L,
154 bool modal =
false,
bool autoShow =
true);
171 const TQString& _defaultName,
172 TQWidget* parent = 0L,
const char* name = 0L,
173 bool modal =
false,
bool autoShow =
true);
185 TQWidget* parent = 0L,
const char* name = 0L,
bool modal =
false);
203 static bool showDialog(KFileItem* item, TQWidget* parent = 0,
204 const char* name = 0,
bool modal =
false);
215 static bool showDialog(
const KURL& _url, TQWidget* parent = 0,
216 const char* name = 0,
bool modal =
false);
228 static bool showDialog(
const KFileItemList& _items, TQWidget* parent = 0,
229 const char* name = 0,
bool modal =
false);
253 const KURL&
kurl()
const {
return m_singleUrl; }
262 KFileItem *
item() {
return m_items.first(); }
267 KFileItemList
items()
const {
return m_items; }
273 TDE_DEPRECATED KDialogBase*
dialog() {
return this; }
278 TDE_DEPRECATED
const KDialogBase*
dialog()
const {
return this; }
303 void updateUrl(
const KURL& _newUrl );
311 void rename(
const TQString& _name );
316 void abortApplying();
325 void showFileSharingPage();
335 void setFileSharingPage(TQWidget* page);
343 void setFileNameReadOnly(
bool ro );
349 virtual void slotOk();
353 virtual void slotCancel();
379 void saveAs(
const KURL &oldUrl, KURL &newUrl);
386 void init (
bool modal =
false,
bool autoShow =
true);
401 KFileItemList m_items;
406 TQString m_defaultName;
412 TQPtrList<KPropsDlgPlugin> m_pageList;
415 void slotStatResult( TDEIO::Job * );
417 virtual void virtual_hook(
int id,
void* data );
419 class KPropertiesDialogPrivate;
420 KPropertiesDialogPrivate *d;
454 virtual void applyChanges();
460 static bool isDesktopFile( KFileItem * _item );
462 void setDirty(
bool b );
463 bool isDirty()
const;
484 virtual void virtual_hook(
int id,
void* data );
486 class KPropsDlgPluginPrivate;
487 KPropsDlgPluginPrivate *d;
510 virtual void applyChanges();
515 static bool supports( KFileItemList _items );
520 void postApplyChanges();
522 void setFileNameReadOnly(
bool ro );
525 void slotEditFileType();
526 void slotCopyFinished( TDEIO::Job * );
527 void slotFileRenamed( TDEIO::Job *,
const KURL &,
const KURL & );
528 void slotDirSizeUpdate();
529 void slotDirSizeFinished( TDEIO::Job * );
530 void slotFoundMountPoint(
const TQString& mp,
unsigned long kBSize,
531 unsigned long kBUsed,
unsigned long kBAvail );
533 void slotSizeDetermine();
537 void slotFoundMountPoint(
const unsigned long& kBSize,
const unsigned long&
538 kBUsed,
const unsigned long& kBAvail,
const TQString& mp );
539 void nameFileChanged(
const TQString &text );
540 void slotIconChanged();
543 void determineRelativePath(
const TQString & path );
544 void applyIconChanges();
549 TQLabel *m_sizeLabel;
550 TQPushButton *m_sizeDetermineButton;
551 TQPushButton *m_sizeStopButton;
553 TQString m_sRelativePath;
554 bool m_bFromTemplate;
561 class KFilePropsPluginPrivate;
562 KFilePropsPluginPrivate *d;
575 enum PermissionsMode {
576 PermissionsOnlyFiles = 0,
577 PermissionsOnlyDirs = 1,
578 PermissionsOnlyLinks = 2,
582 enum PermissionsTarget {
583 PermissionsOwner = 0,
584 PermissionsGroup = 1,
585 PermissionsOthers = 2
594 virtual void applyChanges();
599 static bool supports( KFileItemList _items );
603 void slotChmodResult( TDEIO::Job * );
604 void slotShowAdvancedPermissions();
607 void setComboContent(TQComboBox *combo, PermissionsTarget target,
608 mode_t permissions, mode_t partial);
609 bool isIrregular(mode_t permissions,
bool isDir,
bool isLink);
610 void enableAccessControls(
bool enable);
611 void updateAccessControls();
612 void getPermissionMasks(mode_t &andFilePermissions,
613 mode_t &andDirPermissions,
614 mode_t &orFilePermissions,
615 mode_t &orDirPermissions);
617 static const mode_t permissionsMasks[3];
618 static const mode_t standardPermissions[4];
619 static const char *permissionsTexts[4][4];
622 TQCheckBox *permBox[3][4];
624 TQComboBox *grpCombo;
626 KLineEdit *usrEdit, *grpEdit;
642 static mode_t fperm[3][4];
644 class KFilePermissionsPropsPluginPrivate;
645 KFilePermissionsPropsPluginPrivate *d;
667 virtual void applyChanges();
669 static bool supports( KFileItemList _items );
681 class KURLPropsPluginPrivate;
682 KURLPropsPluginPrivate *d;
702 virtual void applyChanges();
703 static bool supports( KFileItemList _items );
707 TQLineEdit *commentEdit;
708 TQLineEdit *patternEdit;
709 TQLineEdit *mimeEdit;
712 TQCheckBox * cbAutoEmbed;
714 class KBindingPropsPluginPrivate;
715 KBindingPropsPluginPrivate *d;
729 virtual void applyChanges();
731 static bool supports( KFileItemList _items );
734 void slotActivated(
int );
735 void slotDeviceChanged();
736 void slotFoundMountPoint(
const unsigned long& kBSize,
737 const unsigned long& ,
738 const unsigned long& kBAvail,
743 void processLockouts();
748 TQCheckBox* readonly;
753 TQStringList m_devicelist;
761 class KDevicePropsPluginPrivate;
762 KDevicePropsPluginPrivate *d;
765 class KPropertiesDesktopBase;
785 virtual void applyChanges();
787 static bool supports( KFileItemList _items );
790 void slotAddFiletype();
791 void slotDelFiletype();
792 void slotBrowseExec();
794 void slotSelectMimetype();
797 void checkCommandChanged();
800 KPropertiesDesktopBase* w;
802 TQString m_origCommandStr;
803 TQString m_terminalOptionStr;
804 TQString m_suidUserStr;
805 TQString m_dcopServiceType;
807 bool m_terminalCloseBool;
812 class KDesktopPropsPluginPrivate;
813 KDesktopPropsPluginPrivate *d;
838 static bool supports( KFileItemList _items );
841 void slotBrowseExec();
844 void enableCheckedEdit();
845 void enableSuidEdit();
849 TQLabel *terminalLabel;
852 TQCheckBox *terminalCheck;
853 TQCheckBox *suidCheck;
854 KLineEdit *terminalEdit;
856 KLineEdit *swallowExecEdit;
857 KLineEdit *swallowTitleEdit;
858 TQButton *execBrowse;
861 TQString swallowExecStr;
862 TQString swallowTitleStr;
863 TQString termOptionsStr;
866 TQString suidUserStr;
868 class KExecPropsPluginPrivate;
869 KExecPropsPluginPrivate *d;
894 static bool supports( KFileItemList _items );
897 void slotDelExtension();
898 void slotAddExtension();
904 void addMimeType(
const TQString & name );
906 TQLineEdit *commentEdit;
907 TQLineEdit *genNameEdit;
908 TQLineEdit *nameEdit;
909 TQListBox *extensionsList;
910 TQListBox *availableExtensionsList;
911 TQPushButton *addExtensionButton;
912 TQPushButton *delExtensionButton;
914 class TDEApplicationPropsPluginPrivate;
915 TDEApplicationPropsPluginPrivate *d;
Used to edit the files containing [Desktop Entry] Type=MimeType.
Used to edit the files containing [Desktop Entry] Type=Application.
Properties plugin for device .desktop files.
Used to edit the files containing [Desktop Entry] Type=Application.
'Permissions' plugin In this plugin you can modify permissions and change the owner of a file.
'General' plugin This plugin displays the name of the file, its size and access times.
The main properties dialog class.
void applied()
This signal is emitted when the properties changes are applied (for example, with the OK button)
TDE_DEPRECATED KDialogBase * dialog()
KFileItemList items() const
const KURL & kurl() const
The URL of the file that has its properties being displayed.
const TQString & defaultName() const
If the dialog is being built from a template, this method returns the default name.
void propertiesClosed()
This signal is emitted when the Properties Dialog is closed (for example, with OK or Cancel buttons)
TDE_DEPRECATED const KDialogBase * dialog() const
const KURL & currentDir() const
If the dialog is being built from a template, this method returns the current directory.
void saveAs(const KURL &oldUrl, KURL &newUrl)
Emitted before changes to oldUrl are saved as newUrl.
void canceled()
This signal is emitted when the properties changes are aborted (for example, with the Cancel button)
A Plugin in the Properties dialog This is an abstract class.
void changed()
Emit this signal when the user changed anything in the plugin's tabs.
KPropertiesDialog * properties
Pointer to the dialog.
virtual void applyChanges()
Applies all changes to the file.
Used to edit the files containing [Desktop Entry] URL=....
This class is a widget showing a lineedit and a button, which invokes a filedialog.
Used to edit the files containing [Desktop Entry] Type=Application.