/usr/include/Wt/WTimeEdit 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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2015 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef WTIME_EDIT_H_
#define WTIME_EDIT_H_
#include <Wt/WLineEdit>
#include <Wt/WTime>
#include <Wt/WTimeValidator>
#include <Wt/WTimePicker>
namespace Wt {
/*! \class WTimeEdit Wt/WTimeEdit Wt/WTimeEdit
* \brief A Time field editor
*
* \sa WTimePicker
* \sa WTime
* \sa WTimeValidator
*
* Styling through CSS is not applicable.
*/
class WT_API WTimeEdit : public WLineEdit
{
public:
/*! \brief Creates a new time edit.
*/
WTimeEdit(WContainerWidget *parent = 0);
virtual ~WTimeEdit();
/*! \brief Sets the time
*
* Does nothing if the current time is \p Null.
*
* \sa time()
*/
void setTime(const WTime& time);
/*! \brief Returns the time.
*
* Returns an invalid time (for which WTime::isValid() returns
* \c false) if the time could not be parsed using the current
* format().
*
* \sa setTime(), WTime::fromString(), WLineEdit::text()
*/
WTime time() const;
/*! \brief Returns the validator
*
* \sa WTimeValidator
*/
virtual WTimeValidator *validator() const;
/*! \brief Sets the format of the Time
*/
void setFormat(const WT_USTRING& format);
/*! \brief Returns the format.
*/
WT_USTRING format() const;
virtual void setHidden(bool hidden, const WAnimation& animation = WAnimation());
/*! \brief Sets the lower limit of the valid time range
*/
void setBottom(const WTime &bottom);
/*! \brief Returns the lower limit of the valid time range
*/
WTime bottom() const;
/*! \brief Sets the upper limit of the valid time range
*/
void setTop(const WTime &top);
/*! \brief Returns the upper limit of the valid time range
*/
WTime top() const;
virtual void load();
protected:
virtual void render(WFlags<RenderFlag> flags);
virtual void propagateSetEnabled(bool enabled);
/*! \brief Sets the value from the time scroller to the line edit.
*/
virtual void setFromTimePicker();
/*! \brief Sets the value from the line edit to the time scroller.
*/
virtual void setFromLineEdit();
private:
WPopupWidget *popup_;
WTimePicker *timePicker_;
void defineJavaScript();
void connectJavaScript(Wt::EventSignalBase& s,
const std::string& methodName);
};
}
#endif // WTIME_EDIT_H_
|