00001
00002
00003
00004
00005 #ifndef _POLICYDLG_H
00006 #define _POLICYDLG_H
00007
00008 #include <kdialogbase.h>
00009
00010 #include <tqlineedit.h>
00011 #include <tqstringlist.h>
00012
00013 class TQLabel;
00014 class TQComboBox;
00015 class TQString;
00016 class TQVBoxLayout;
00017 class TQPushButton;
00018
00019 class Policies;
00020
00032 class PolicyDialog : public KDialogBase
00033 {
00034 Q_OBJECT
00035
00036 public:
00041 enum FeatureEnabledPolicy { InheritGlobal = 0, Accept, Reject };
00042
00050 PolicyDialog(Policies *policies, TQWidget *parent = 0, const char *name = 0 );
00051
00052 virtual ~PolicyDialog() {};
00053
00054
00055
00056
00057
00058 FeatureEnabledPolicy featureEnabledPolicy() const;
00059
00064 TQString featureEnabledPolicyText() const;
00065
00066
00067
00068
00069 TQString domain() const { return le_domain->text(); }
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 void setDisableEdit( bool , const TQString& text = TQString::null );
00081
00086 void setFeatureEnabledLabel(const TQString &text);
00087
00093 void setFeatureEnabledWhatsThis(const TQString &text);
00094
00099 void refresh();
00100
00111 void addPolicyPanel(TQWidget *panel);
00112
00113 protected slots:
00114
00115 virtual void accept();
00116 void slotTextChanged( const TQString &text);
00117
00118 private:
00119 Policies *policies;
00120 TQVBoxLayout *topl;
00121 int insertIdx;
00122 TQLineEdit *le_domain;
00123 TQLabel *l_feature_policy;
00124 TQComboBox *cb_feature_policy;
00125 TQWidget *panel;
00126 TQStringList policy_values;
00127 TQPushButton *okButton;
00128 };
00129
00130 #endif