projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correctly handle the font property "underline"
[quassel.git]
/
src
/
uisupport
/
uistyle.h
diff --git
a/src/uisupport/uistyle.h
b/src/uisupport/uistyle.h
index
22ade27
..
9b9365d
100644
(file)
--- a/
src/uisupport/uistyle.h
+++ b/
src/uisupport/uistyle.h
@@
-32,11
+32,11
@@
#include "message.h"
#include "settings.h"
#include "message.h"
#include "settings.h"
-class UiStyle {
- Q_
DECLARE_TR_FUNCTIONS(UiStyle)
+class UiStyle
: public QObject
{
+ Q_
OBJECT
public:
public:
- UiStyle();
+ UiStyle(
QObject *parent = 0
);
virtual ~UiStyle();
typedef QList<QPair<quint16, quint32> > FormatList;
virtual ~UiStyle();
typedef QList<QPair<quint16, quint32> > FormatList;
@@
-114,12
+114,14
@@
public:
QList<QTextLayout::FormatRange> toTextLayoutList(const FormatList &, int textLength, quint32 messageLabel = 0);
QList<QTextLayout::FormatRange> toTextLayoutList(const FormatList &, int textLength, quint32 messageLabel = 0);
-p
rotected
:
+p
ublic slots
:
void loadStyleSheet();
void loadStyleSheet();
- //! Determines the format set to be used for the given hostmask
- //int formatSetIndex(const QString &hostmask) const;
- //int formatSetIndexForSelf() const;
+signals:
+ void changed();
+
+protected:
+ QString loadStyleSheet(const QString &name, bool shouldExist = false);
QTextCharFormat cachedFormat(quint64 key) const;
QTextCharFormat cachedFormat(quint32 formatType, quint32 messageLabel = 0) const;
QTextCharFormat cachedFormat(quint64 key) const;
QTextCharFormat cachedFormat(quint32 formatType, quint32 messageLabel = 0) const;
@@
-148,6
+150,9
@@
public:
inline FormatType timestampFormat() const { return UiStyle::Timestamp; }
FormatType senderFormat() const;
const FormatList &contentsFormatList() const;
inline FormatType timestampFormat() const { return UiStyle::Timestamp; }
FormatType senderFormat() const;
const FormatList &contentsFormatList() const;
+
+ quint8 senderHash() const;
+
protected:
//! Styling is only needed for calls to plainContents() and contentsFormatList()
void style() const;
protected:
//! Styling is only needed for calls to plainContents() and contentsFormatList()
void style() const;
@@
-155,6
+160,7
@@
protected:
private:
mutable StyledString _contents;
private:
mutable StyledString _contents;
+ mutable quint8 _senderHash;
};
QDataStream &operator<<(QDataStream &out, const UiStyle::FormatList &formatList);
};
QDataStream &operator<<(QDataStream &out, const UiStyle::FormatList &formatList);