/usr/include/KF5/libkdepim/kdatepickerpopup.h is in libkf5libkdepim-dev 4:17.12.3-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | /*
This file is part of libkdepim.
Copyright (c) 2004 Bram Schoenmakers <bramschoenmakers@kde.nl>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDEPIM_KDATEPICKERPOPUP_H
#define KDEPIM_KDATEPICKERPOPUP_H
#include "kdepim_export.h"
#include <QDate>
#include <QMenu>
class KDatePicker;
namespace KPIM {
/**
* @short This menu helps the user to select a date quickly.
*
* This menu helps the user to select a date quickly. It offers various
* modes of selecting, e.g. with a KDatePicker or with words like "Tomorrow".
*
* The available modes are:
*
* @li NoDate: A menu-item with "No Date". If chosen, the datepicker will emit
* a null QDate.
* @li DatePicker: Shows a KDatePicker-widget.
* @li Words: Shows items like "Today", "Tomorrow" or "Next Week".
*
* @author Bram Schoenmakers <bram_s@softhome.net>
*/
class KDEPIM_EXPORT KDatePickerPopup : public QMenu
{
Q_OBJECT
public:
/**
* Describes the available selection modes.
*/
enum Mode {
NoDate = 1, ///< A menu-item with "No Date". Will always return an invalid date.
DatePicker = 2, ///< A menu-item with a KDatePicker.
Words = 4 ///< A menu-item with list of words that describe a date.
};
/**
* Describes the a set of combined modes.
*/
Q_DECLARE_FLAGS(Modes, Mode)
/**
* Creates a new date picker popup.
*
* @param modes The selection modes that shall be offered
* @param date The initial date of date picker widget.
* @param parent The parent object.
*/
explicit KDatePickerPopup(Modes modes = DatePicker, const QDate &date = QDate::currentDate(), QWidget *parent = nullptr);
/**
* Destroys the date picker popup.
*/
~KDatePickerPopup();
/**
* Returns the used KDatePicker object.
*/
KDatePicker *datePicker() const;
public Q_SLOTS:
/**
* Sets the current @p date.
*/
void setDate(const QDate &date);
Q_SIGNALS:
/**
* This signal is emitted whenever the user has selected a new date.
*
* @param date The new date.
*/
void dateChanged(const QDate &date);
private:
//@cond PRIVATE
class Private;
Private *const d;
//@endcond
};
Q_DECLARE_OPERATORS_FOR_FLAGS(KDatePickerPopup::Modes)
}
#endif
|