mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
As of workshop RW/KB, improved / fixed text messages
Also refs #351 * messages can be formatted with style sheet * fixed: removed command from message * added originator to command line * msg parsing now in core * using ITimestampBased for text messages and status messages * allow to resize rows to content (view base) * model / views for text messages * removed old qt stylesheets
This commit is contained in:
@@ -27,7 +27,9 @@ namespace BlackMisc
|
||||
{
|
||||
IndexUtcTimestamp = BlackMisc::CPropertyIndex::GlobalIndexTimestampBased,
|
||||
IndexUtcTimestampFormatted,
|
||||
IndexMSecsSinceEpoch
|
||||
IndexUtcTimestampFormattedHms,
|
||||
IndexUtcTimestampFormattedHm,
|
||||
IndexMSecsSinceEpoch // keep this as last item
|
||||
};
|
||||
|
||||
//! Get timestamp
|
||||
@@ -39,9 +41,6 @@ namespace BlackMisc
|
||||
//! Timestamp as ms value
|
||||
void setMSecsSinceEpoch(qint64 mSecsSinceEpoch) { m_timestampMSecsSinceEpoch = mSecsSinceEpoch; }
|
||||
|
||||
//! Formatted timestamp
|
||||
QString getFormattedUtcTimestamp() const;
|
||||
|
||||
//! Set timestamp
|
||||
void setUtcTimestamp(const QDateTime ×tamp);
|
||||
|
||||
@@ -72,12 +71,23 @@ namespace BlackMisc
|
||||
//! Set the current time as timestamp
|
||||
void setCurrentUtcTime();
|
||||
|
||||
//! Formatted timestamp
|
||||
QString getFormattedUtcTimestamp() const;
|
||||
|
||||
//! As hh:mm:ss
|
||||
QString getFormattedUtcTimestampHms() const;
|
||||
|
||||
//! As hh:mm
|
||||
QString getFormattedUtcTimestampHm() const;
|
||||
|
||||
//! As YYYY mm dd hh ss
|
||||
QString getFormattedUtcTimestampYmdhms() const;
|
||||
|
||||
//! As YYYY mm dd hh ss.zzz
|
||||
QString getFormattedUtcTimestampYmdhmsz() const;
|
||||
|
||||
//! Can given index be handled
|
||||
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
int i = index.frontCasted<int>();
|
||||
return (i >= static_cast<int>(IndexUtcTimestamp)) && (i <= static_cast<int>(IndexMSecsSinceEpoch));
|
||||
}
|
||||
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index);
|
||||
|
||||
protected:
|
||||
//! \copydoc CValueObject::propertyByIndex
|
||||
|
||||
Reference in New Issue
Block a user