summaryrefslogtreecommitdiffstats
path: root/kalarm/latecancel.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /kalarm/latecancel.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/latecancel.h')
-rw-r--r--kalarm/latecancel.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/kalarm/latecancel.h b/kalarm/latecancel.h
new file mode 100644
index 00000000..ccbc389b
--- /dev/null
+++ b/kalarm/latecancel.h
@@ -0,0 +1,69 @@
+/*
+ * latecancel.h - widget to specify cancellation if late
+ * Program: kalarm
+ * Copyright (C) 2004 by David Jarvie <software@astrojar.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef LATECANCEL_H
+#define LATECANCEL_H
+
+#include <qframe.h>
+
+#include "timeperiod.h"
+#include "timeselector.h"
+class QBoxLayout;
+class QWidgetStack;
+class CheckBox;
+
+
+class LateCancelSelector : public QFrame
+{
+ Q_OBJECT
+ public:
+ LateCancelSelector(bool allowHourMinute, QWidget* parent, const char* name = 0);
+ int minutes() const;
+ void setMinutes(int Minutes, bool dateOnly, TimePeriod::Units defaultUnits);
+ void setDateOnly(bool dateOnly);
+ void showAutoClose(bool show);
+ bool isAutoClose() const;
+ void setAutoClose(bool autoClose);
+ bool isReadOnly() const { return mReadOnly; }
+ void setReadOnly(bool);
+
+ static QString i18n_CancelIfLate(); // plain text of 'Cancel if late' checkbox
+ static QString i18n_n_CancelIfLate(); // text of 'Cancel if late' checkbox, with 'N' shortcut
+ static QString i18n_AutoCloseWin(); // plain text of 'Auto-close window after this time' checkbox
+ static QString i18n_AutoCloseWinLC(); // plain text of 'Auto-close window after late-cancelation time' checkbox
+ static QString i18n_i_AutoCloseWinLC(); // text of 'Auto-close window after late-cancelation time' checkbox, with 'I' shortcut
+
+ private slots:
+ void slotToggled(bool);
+
+ private:
+ QBoxLayout* mLayout; // overall layout for the widget
+ QWidgetStack* mStack; // contains mCheckboxFrame and mTimeSelectorFrame
+ QFrame* mCheckboxFrame;
+ CheckBox* mCheckbox; // displayed when late cancellation is not selected
+ QFrame* mTimeSelectorFrame;
+ TimeSelector* mTimeSelector; // displayed when late cancellation is selected
+ CheckBox* mAutoClose;
+ bool mDateOnly; // hours/minutes units not allowed
+ bool mReadOnly; // widget is read-only
+ bool mAutoCloseShown; // auto-close checkbox is visible
+};
+
+#endif // LATECANCEL_H