kspread

CalendarToolWidget.h

Go to the documentation of this file.
00001  /***************************************************************************
00002  *   Copyright (C) 2005 by Raphael Langerhorst <raphael-langerhorst@gmx.at>*
00003  *                                                                         *
00004  *   Permission is hereby granted, free of charge, to any person obtaining *
00005  *   a copy of this software and associated documentation files (the       *
00006  *   "Software"), to deal in the Software without restriction, including   *
00007  *   without limitation the rights to use, copy, modify, merge, publish,   *
00008  *   distribute, sublicense, and/or sell copies of the Software, and to    *
00009  *   permit persons to whom the Software is furnished to do so, subject to *
00010  *   the following conditions:                                             *
00011  *                                                                         *
00012  *   The above copyright notice and this permission notice shall be        *
00013  *   included in all copies or substantial portions of the Software.       *
00014  *                                                                         *
00015  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00016  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00017  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00018  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00019  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00020  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00021  *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00022  ***************************************************************************/
00023 
00024 #ifndef KSPREAD_CALENDAR_TOOL_WIDGET
00025 #define KSPREAD_CALENDAR_TOOL_WIDGET
00026 
00027 #include <ui_CalendarToolWidget.h>
00028 
00029 
00030 class KDatePicker;
00031 
00032 namespace KSpread
00033 {
00034 
00039 class CalendarToolWidget : public QDialog, public Ui::CalendarToolWidget
00040 {
00041   Q_OBJECT
00042 
00043   private:
00044 
00050     KDatePicker* m_datePicker;
00051 
00052   public:
00053 
00059     CalendarToolWidget(QWidget* parent = 0);
00060 
00064     virtual ~CalendarToolWidget();
00065 
00066   protected:
00067 
00077     bool buildDatePickerFrame();
00078 
00079   protected slots:
00080 
00086     void datePickerDeleted();
00087 
00091     void emitInsertCalendar();
00092 
00093   public slots:
00094 
00099     void showStartDatePicker();
00100 
00105     void showEndDatePicker();
00106 
00111     void setStartDate(const QDate&);
00112 
00117     void setEndDate(const QDate&);
00118 
00119   public:
00120 
00121     // METHODS for getting data //
00122 
00126     QDate startDate() const;
00127 
00131     QDate endDate() const;
00132 
00133   signals:
00134 
00143     void insertCalendar(const QDate &from, const QDate &to);
00144 };
00145 
00146 }
00147 
00148 #endif // KSPREAD_CALENDAR_TOOL_WIDGET