/usr/include/Wt/WTimePicker is in libwt-dev 3.3.6+dfsg-1.1.
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 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2016 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef WTIME_PICKER_H_
#define WTIME_PICKER_H_
#include "WCompositeWidget"
#include "WContainerWidget"
#include "WTime"
#include "WSpinBox"
#include "WStringStream"
#include "WComboBox"
namespace Wt {
class WTimeEdit;
/*! \class WTimePicker Wt/WTimePicker Wt/WTimePicker
* \brief A Time Picker
*
* \sa WTimeEdit
* \sa WTime
* \sa WTimeValidator
*
* Styling through CSS is not applicable.
*
*/
class WT_API WTimePicker : public WCompositeWidget
{
public:
/*! \brief Creates a new time picker.
*/
WTimePicker(WContainerWidget *parent = 0);
/*! \brief Creates a new time picker.
*/
WTimePicker(const WTime &time, WContainerWidget *parent = 0);
/*! \brief Creates a new time picker.
*/
WTimePicker(WTimeEdit *timeEdit, WContainerWidget *parent = 0);
/*! \brief Creates a new time picker.
*/
WTimePicker(const WTime &time, WTimeEdit *timeEdit, WContainerWidget *parent = 0);
virtual ~WTimePicker();
/*! \brief Returns the time
*/
WTime time() const;
/*! \brief Sets the time
*/
void setTime(const WTime& time);
/*! \brief Signal emitted when the value is changed
*/
Signal<>& selectionChanged() { return selectionChanged_; }
void configure();
private:
void init(const WTime &time = WTime());
WT_USTRING format_;
WSpinBox *sbhour_;
WSpinBox *sbminute_;
WSpinBox *sbsecond_;
WSpinBox *sbmillisecond_;
WComboBox *cbAP_;
WTimeEdit *timeEdit_;
void createWidgets();
void hourValueChanged();
void minuteValueChanged();
void secondValueChanged();
void msecValueChanged();
void ampmValueChanged();
bool formatAp() const;
bool formatMs() const;
Signal<> selectionChanged_;
};
} // end namespace Wt
#endif // WTIME_PICKER_H_
|