/***************************************************************************
- * Copyright (C) 2005-09 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
_colorFillMenu->addAction(pix, tr("Clear Color"))->setData("");
ui.textcolorButton->setMenu(_colorMenu);
- connect(_colorMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorChoosen(QAction*)));
+ connect(_colorMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorChosen(QAction*)));
ui.highlightcolorButton->setMenu(_colorFillMenu);
- connect(_colorFillMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorHighlightChoosen(QAction*)));
+ connect(_colorFillMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorHighlightChosen(QAction*)));
new TabCompleter(ui.inputEdit);
ui.underlineButton->setChecked(f.underline());
}
-void InputWidget::colorChoosen(QAction * action) {
+void InputWidget::colorChosen(QAction *action) {
QTextCharFormat fmt;
QColor color;
if (qVariantValue<QString>(action->data()) == "") {
ui.textcolorButton->setIcon(createColorToolButtonIcon(SmallIcon("format-text-color"), color));
}
-void InputWidget::colorHighlightChoosen(QAction * action) {
+void InputWidget::colorHighlightChosen(QAction *action) {
QTextCharFormat fmt;
QColor color;
if (qVariantValue<QString>(action->data()) == "") {
}
}
-QIcon InputWidget::createColorToolButtonIcon(const QIcon &icon, QColor color) {
+QIcon InputWidget::createColorToolButtonIcon(const QIcon &icon, const QColor &color) {
QPixmap pixmap(16, 16);
pixmap.fill(Qt::transparent);
QPainter painter(&pixmap);
/***************************************************************************
- * Copyright (C) 2005-09 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
void on_boldButton_clicked(bool checked);
void on_italicButton_clicked(bool checked);
void on_underlineButton_clicked(bool checked);
- void colorChoosen(QAction * action);
- void colorHighlightChoosen(QAction * action);
+ void colorChosen(QAction *action);
+ void colorHighlightChosen(QAction *action);
private:
Ui::InputWidget ui;
void fontChanged(const QFont &f);
void colorChanged(const QColor &fg);
void colorHighlightChanged(const QColor &bg);
- QIcon createColorToolButtonIcon(const QIcon &icon, QColor color);
+ QIcon createColorToolButtonIcon(const QIcon &icon, const QColor &color);
QTextCharFormat getFormatOfWordOrSelection();
void setFormatOnWordOrSelection(const QTextCharFormat &format);
};
/***************************************************************************
- * Copyright (C) 2005/06 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
}
QString MultiLineEdit::convertHtmlToMircCodes(const QString &text) {
- qWarning() << text;
-
QRegExp regexHtmlContent = QRegExp("<p.*>(.*)</p>", Qt::CaseInsensitive);
regexHtmlContent.setMinimal(true);
if (regexHtmlContent.indexIn((text)) > -1) {
htmlContent = regexHtmlContent.cap(1);
- qWarning() << htmlContent;
QStringList lines = htmlContent.split("<br />");
for (int i=0; i < lines.count(); i++) {
line = line2 = lines[i];
line.replace(">",">");
line.replace(""","\"");
- qWarning() << line;
- qWarning() << line2;
- result << line;
- }
+ result << line;
+ }
}
return result.join("\n");
}
/***************************************************************************
- * Copyright (C) 2005-09 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *