Fixed the segfault mentioned earlier. Also, I have converted all colornames
we used to RGB codes, since Qtopia does not (necessarily) support named colors...
# Find files
INCLUDEPATH += ../src/qtopia ../src/uisupport ../src/client ../src/common
# Find files
INCLUDEPATH += ../src/qtopia ../src/uisupport ../src/client ../src/common
-DESTDIR = .
-OBJECTS_DIR = .obj
-MOC_DIR = .moc
-UIC_DIR = .ui
+#DESTDIR = .
+#OBJECTS_DIR = .obj
+#MOC_DIR = .moc
+#UIC_DIR = .ui
# Include .pri from src dirs
include(../src/common/common.pri)
# Include .pri from src dirs
include(../src/common/common.pri)
}
void ChatWidget::prependChatLine(ChatLine *line) {
}
void ChatWidget::prependChatLine(ChatLine *line) {
+ qDebug() << "prepending"; return;
QTextCursor cursor = textCursor();
moveCursor(QTextCursor::Start);
insertHtml(line->text());
QTextCursor cursor = textCursor();
moveCursor(QTextCursor::Start);
insertHtml(line->text());
#include "qtopiastyle.h"
QtopiaUi::QtopiaUi(QtopiaMainWin *mw) : AbstractUi(), mainWin(mw) {
#include "qtopiastyle.h"
QtopiaUi::QtopiaUi(QtopiaMainWin *mw) : AbstractUi(), mainWin(mw) {
- _style = new QtopiaStyle();
+ _style = new QtopiaUiStyle();
connect(mainWin, SIGNAL(connectToCore(const QVariantMap &)), this, SIGNAL(connectToCore(const QVariantMap &)));
connect(mainWin, SIGNAL(disconnectFromCore()), this, SIGNAL(disconnectFromCore()));
connect(mainWin, SIGNAL(connectToCore(const QVariantMap &)), this, SIGNAL(connectToCore(const QVariantMap &)));
connect(mainWin, SIGNAL(disconnectFromCore()), this, SIGNAL(disconnectFromCore()));
-QtopiaStyle *QtopiaUi::style() const {
+QtopiaUiStyle *QtopiaUi::style() const {
#include "quasselui.h"
class QtopiaMainWin;
#include "quasselui.h"
class QtopiaMainWin;
//! This class encapsulates Quassel's GUI for Qtopia.
class QtopiaUi : public AbstractUi {
//! This class encapsulates Quassel's GUI for Qtopia.
class QtopiaUi : public AbstractUi {
void init();
AbstractUiMsg *layoutMsg(const Message &);
void init();
AbstractUiMsg *layoutMsg(const Message &);
- QtopiaStyle *style() const;
+ QtopiaUiStyle *style() const;
protected slots:
void connectedToCore();
protected slots:
void connectedToCore();
private:
QtopiaMainWin *mainWin;
private:
QtopiaMainWin *mainWin;
-QtopiaStyle::QtopiaStyle() : UiStyle() {
+QtopiaUiStyle::QtopiaUiStyle() : UiStyle() {
QTextCharFormat def;
def.setFont(QFont("Verdana",6));
QTextCharFormat def;
def.setFont(QFont("Verdana",6));
// We need to just set our internal formats; everything else is done by the base class...
// Internal message formats
// We need to just set our internal formats; everything else is done by the base class...
// Internal message formats
QTextCharFormat plainMsg;
QTextCharFormat plainMsg;
- plainMsg.setForeground(QBrush("black"));
+ plainMsg.setForeground(QBrush("#000000"));
setFormat(PlainMsg, plainMsg);
QTextCharFormat notice;
setFormat(PlainMsg, plainMsg);
QTextCharFormat notice;
- notice.setForeground(QBrush("navy"));
+ notice.setForeground(QBrush("#000080"));
setFormat(NoticeMsg, notice);
QTextCharFormat server;
setFormat(NoticeMsg, notice);
QTextCharFormat server;
- server.setForeground(QBrush("navy"));
+ server.setForeground(QBrush("#000080"));
setFormat(ServerMsg, server);
QTextCharFormat error;
setFormat(ServerMsg, server);
QTextCharFormat error;
- error.setForeground(QBrush("red"));
+ error.setForeground(QBrush("#ff0000"));
setFormat(ErrorMsg, error);
QTextCharFormat join;
setFormat(ErrorMsg, error);
QTextCharFormat join;
- join.setForeground(QBrush("green"));
+ join.setForeground(QBrush("#008000"));
setFormat(JoinMsg, join);
QTextCharFormat part;
setFormat(JoinMsg, join);
QTextCharFormat part;
- part.setForeground(QBrush("indianred"));
+ part.setForeground(QBrush("#cd5c5c"));
setFormat(PartMsg, part);
QTextCharFormat quit;
setFormat(PartMsg, part);
QTextCharFormat quit;
- quit.setForeground(QBrush("indianred"));
+ quit.setForeground(QBrush("#cd5c5c"));
setFormat(QuitMsg, quit);
QTextCharFormat kick;
setFormat(QuitMsg, quit);
QTextCharFormat kick;
- kick.setForeground(QBrush("indianred"));
+ kick.setForeground(QBrush("#cd5c5c"));
setFormat(KickMsg, kick);
QTextCharFormat nren;
setFormat(KickMsg, kick);
QTextCharFormat nren;
- nren.setForeground(QBrush("magenta"));
+ nren.setForeground(QBrush("#6a5acd"));
setFormat(RenameMsg, nren);
QTextCharFormat mode;
setFormat(RenameMsg, nren);
QTextCharFormat mode;
- mode.setForeground(QBrush("steelblue"));
+ mode.setForeground(QBrush("#4682b4"));
setFormat(ModeMsg, mode);
QTextCharFormat action;
action.setFontItalic(true);
setFormat(ModeMsg, mode);
QTextCharFormat action;
action.setFontItalic(true);
- action.setForeground(QBrush("darkmagenta"));
+ action.setForeground(QBrush("#8b008b"));
setFormat(ActionMsg, action);
// Internal message element formats
QTextCharFormat ts;
setFormat(ActionMsg, action);
// Internal message element formats
QTextCharFormat ts;
- ts.setForeground(QBrush("grey"));
+ ts.setForeground(QBrush("#808080"));
setFormat(Timestamp, ts);
QTextCharFormat sender;
sender.setAnchor(true);
setFormat(Timestamp, ts);
QTextCharFormat sender;
sender.setAnchor(true);
- sender.setForeground(QBrush("navy"));
+ sender.setForeground(QBrush("#000080"));
setFormat(Sender, sender);
QTextCharFormat nick;
setFormat(Sender, sender);
QTextCharFormat nick;
url.setAnchor(true);
setFormat(Url, url);
url.setAnchor(true);
setFormat(Url, url);
-QtopiaStyle::~QtopiaStyle() {}
+QtopiaUiStyle::~QtopiaUiStyle() {}
-class QtopiaStyle : public UiStyle {
+class QtopiaUiStyle : public UiStyle {
- QtopiaStyle();
- virtual ~QtopiaStyle();
+ QtopiaUiStyle();
+ virtual ~QtopiaUiStyle();
UiStyle::UiStyle() {
// Default format
QTextCharFormat def;
UiStyle::UiStyle() {
// Default format
QTextCharFormat def;
- def.setForeground(QBrush("black"));
+ def.setForeground(QBrush("#000000"));
def.setFont(QFont("Verdana",9));
_formats = QVector<QTextCharFormat>(NumFormatTypes, def);
// Initialize color codes according to mIRC "standard"
QStringList colors;
def.setFont(QFont("Verdana",9));
_formats = QVector<QTextCharFormat>(NumFormatTypes, def);
// Initialize color codes according to mIRC "standard"
QStringList colors;
- colors << "white" << "black" << "navy" << "green" << "red" << "maroon" << "purple" << "orange";
- colors << "yellow" << "lime" << "teal" << "aqua" << "royalblue" << "fuchsia" << "grey" << "silver";
+ //colors << "white" << "black" << "navy" << "green" << "red" << "maroon" << "purple" << "orange";
+ //colors << "yellow" << "lime" << "teal" << "aqua" << "royalblue" << "fuchsia" << "grey" << "silver";
+ colors << "#ffffff" << "#000000" << "#000080" << "#008000" << "#ff0000" << "#800000" << "#800080" << "#ffa500";
+ colors << "#ffff00" << "#00ff00" << "#008080" << "#00ffff" << "#4169E1" << "#ff00ff" << "#808080" << "#c0c0c0";
// Now initialize the mapping between FormatCodes and FormatTypes...
_formatCodes["%O"] = None;
// Now initialize the mapping between FormatCodes and FormatTypes...
_formatCodes["%O"] = None;