mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-30 17:20:32 +01:00
2024-02-08 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDTimeEdit::Mode' enumeration. * Added 'RDTimeEdit::mode()', 'RDTimeEdit::setMode()', 'RDTimeEdit::length()' and 'RDTimeEdit::setLength()' methods. * Fixed a regression in rdlibrary(1) that caused the 'Forced Length' control in the 'Edit Cart' dialog to be misformatted when the system was configured to use 12 hour time format. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A QTimeEdit with tenth-second precision.
|
||||
//
|
||||
// (C) Copyright 2003-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2003-2024 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -28,15 +28,20 @@ class RDTimeEdit : public QTimeEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Mode {TimeMode=0,LengthMode=1};
|
||||
RDTimeEdit(QWidget *parent=0);
|
||||
Mode mode() const;
|
||||
void setMode(Mode mode);
|
||||
bool showHours() const;
|
||||
void setShowHours(bool state);
|
||||
bool showTenths() const;
|
||||
void setShowTenths(bool state);
|
||||
bool isReadOnly() const;
|
||||
int length() const;
|
||||
|
||||
public slots:
|
||||
void setReadOnly(bool state);
|
||||
void setLength(int msec);
|
||||
void setReadOnly(bool state);
|
||||
|
||||
protected:
|
||||
QValidator::State validate(QString &input,int &pos) const;
|
||||
@@ -51,6 +56,7 @@ class RDTimeEdit : public QTimeEdit
|
||||
int d_width_variance;
|
||||
QAbstractSpinBox::StepEnabled d_step_enabled;
|
||||
bool d_read_only;
|
||||
Mode d_mode;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user