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:
Klaus Basan
2015-03-13 01:53:37 +01:00
parent aee2b2495f
commit 269c65b578
73 changed files with 1301 additions and 1311 deletions

View File

@@ -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 &timestamp);
@@ -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