From b6887381d7062e2150c5511d50ac03421bcc211d Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 20 Nov 2016 23:58:22 +0900 Subject: Trash limit: add "fixed size" configuration option and code improvements. This relates to bug 1923. Signed-off-by: Michele Calgaro --- tdeioslave/trash/ktrashpropsdlgplugin.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'tdeioslave/trash/ktrashpropsdlgplugin.h') diff --git a/tdeioslave/trash/ktrashpropsdlgplugin.h b/tdeioslave/trash/ktrashpropsdlgplugin.h index b62ba127d..d21dd4578 100644 --- a/tdeioslave/trash/ktrashpropsdlgplugin.h +++ b/tdeioslave/trash/ktrashpropsdlgplugin.h @@ -22,13 +22,14 @@ #ifndef KTRASHPROPSDLGPLUGIN_H #define KTRASHPROPSDLGPLUGIN_H -#include +#include "kpropertiesdialog.h" class KDoubleSpinBox; class TQCheckBox; class TQComboBox; class TQFrame; class TQLabel; +class TQRadioButton; class TQSpinBox; class TrashImpl; @@ -43,21 +44,29 @@ class KTrashPropsDlgPlugin : public KPropsDlgPlugin virtual void applyChanges(); private slots: - void percentChanged( double ); + void percentSizeChanged( double ); + void fixedSizeChanged( double ); + void fixedSizeUnitActivated ( int ); + void rbPercentSizeToggled( bool ); + void rbFixedSizeToggled( bool ); void trashChanged( int ); void useTypeChanged(); - + private: void readConfig(); void writeConfig(); void setupGui( TQFrame *frame ); TQCheckBox *mUseTimeLimit; - TQSpinBox *mDays; + TQSpinBox *mDays; TQCheckBox *mUseSizeLimit; - TQWidget *mSizeWidget; - KDoubleSpinBox *mPercent; - TQLabel *mSizeLabel; + int mSizeLimitType; + TQWidget *mSizeWidget; + TQRadioButton *mRbPercentSize, *mRbFixedSize; + KDoubleSpinBox *mPercentSize; + KDoubleSpinBox *mFixedSize; + TQComboBox *mFixedSizeUnit; + TQLabel *mSizeLabel; TQComboBox *mLimitReachedAction; TrashImpl *mTrashImpl; @@ -67,7 +76,10 @@ class KTrashPropsDlgPlugin : public KPropsDlgPlugin bool useTimeLimit; int days; bool useSizeLimit; + int sizeLimitType; double percent; + double fixedSize; + int fixedSizeUnit; int actionType; } ConfigEntry; -- cgit v1.2.1