Better time formatting by using an explicit format
[quassel.git] / src / uisupport / qssparser.h
index f450114..c583892 100644 (file)
@@ -1,42 +1,43 @@
 /***************************************************************************
-*   Copyright (C) 2005-09 by the Quassel Project                          *
-*   devel@quassel-irc.org                                                 *
-*                                                                         *
-*   This program is free software; you can redistribute it and/or modify  *
-*   it under the terms of the GNU General Public License as published by  *
-*   the Free Software Foundation; either version 2 of the License, or     *
-*   (at your option) version 3.                                           *
-*                                                                         *
-*   This program is distributed in the hope that it will be useful,       *
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
-*   GNU General Public License for more details.                          *
-*                                                                         *
-*   You should have received a copy of the GNU General Public License     *
-*   along with this program; if not, write to the                         *
-*   Free Software Foundation, Inc.,                                       *
-*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
-***************************************************************************/
+ *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
 
 #ifndef QSSPARSER_H_
 #define QSSPARSER_H_
 
 #include "uistyle.h"
 
-class QssParser {
-  Q_DECLARE_TR_FUNCTIONS(QssParser)
+class QssParser
+{
+    Q_DECLARE_TR_FUNCTIONS(QssParser)
 
-  public:
+public:
     QssParser();
 
     void processStyleSheet(QString &sheet);
 
     inline QPalette palette() const { return _palette; }
     inline QVector<QBrush> uiStylePalette() const { return _uiStylePalette; }
-    inline const QHash<quint64, QTextCharFormat>formats() const { return _formats; }
-    inline const QHash<quint32, QTextCharFormat>listItemFormats() const { return _listItemFormats; }
+    inline const QHash<quint64, QTextCharFormat> &formats() const { return _formats; }
+    inline const QHash<quint32, QTextCharFormat> &listItemFormats() const { return _listItemFormats; }
 
-  protected:
+protected:
     typedef QList<qreal> ColorTuple;
 
     void parseChatLineBlock(const QString &decl, const QString &contents);
@@ -64,7 +65,7 @@ class QssParser {
     QHash<QString, QPalette::ColorRole> _paletteColorRoles;
     QHash<QString, UiStyle::ColorRole> _uiStyleColorRoles;
 
-  private:
+private:
     QPalette _palette;
     QVector<QBrush> _uiStylePalette;
     QHash<quint64, QTextCharFormat> _formats;
@@ -72,4 +73,5 @@ class QssParser {
     int _maxSenderHash;
 };
 
+
 #endif