From b10c83f8fe1a64ff0fce7b54cb61c3fddd540137 Mon Sep 17 00:00:00 2001 From: cfdev Date: Mon, 1 Apr 2013 13:49:34 +0000 Subject: [PATCH] Add the HTML Editor ! git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2081 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- qelectrotech.pro | 13 +- sources/diagramtextitem.cpp | 29 +- sources/diagramtextitem.h | 2 + sources/diagramview.cpp | 25 + sources/diagramview.h | 1 + sources/htmleditor/highlighter.cpp | 269 ++++++++ sources/htmleditor/highlighter.h | 70 ++ sources/htmleditor/htmleditor.cpp | 645 ++++++++++++++++++ sources/htmleditor/htmleditor.h | 122 ++++ sources/htmleditor/htmleditor.qrc | 33 + sources/htmleditor/htmleditor.ui | 629 +++++++++++++++++ sources/htmleditor/images/bulleted-list.png | Bin 0 -> 678 bytes sources/htmleditor/images/document-new.png | Bin 0 -> 692 bytes sources/htmleditor/images/document-open.png | Bin 0 -> 919 bytes .../htmleditor/images/document-save-as.png | Bin 0 -> 1097 bytes sources/htmleditor/images/document-save.png | Bin 0 -> 1150 bytes sources/htmleditor/images/edit-copy.png | Bin 0 -> 725 bytes sources/htmleditor/images/edit-cut.png | Bin 0 -> 1177 bytes sources/htmleditor/images/edit-paste.png | Bin 0 -> 773 bytes sources/htmleditor/images/edit-redo.png | Bin 0 -> 810 bytes sources/htmleditor/images/edit-select-all.png | Bin 0 -> 645 bytes sources/htmleditor/images/edit-undo.png | Bin 0 -> 1011 bytes .../htmleditor/images/format-indent-less.png | Bin 0 -> 683 bytes .../htmleditor/images/format-indent-more.png | Bin 0 -> 698 bytes .../images/format-justify-center.png | Bin 0 -> 506 bytes .../htmleditor/images/format-justify-fill.png | Bin 0 -> 495 bytes .../htmleditor/images/format-justify-left.png | Bin 0 -> 494 bytes .../images/format-justify-right.png | Bin 0 -> 506 bytes .../htmleditor/images/format-text-bold.png | Bin 0 -> 939 bytes .../htmleditor/images/format-text-italic.png | Bin 0 -> 784 bytes .../images/format-text-strikethrough.png | Bin 0 -> 797 bytes .../images/format-text-underline.png | Bin 0 -> 869 bytes sources/htmleditor/images/image-x-generic.png | Bin 0 -> 900 bytes sources/htmleditor/images/insert-html.png | Bin 0 -> 757 bytes sources/htmleditor/images/list-add.png | Bin 0 -> 386 bytes sources/htmleditor/images/list-remove.png | Bin 0 -> 252 bytes sources/htmleditor/images/numbered-list.png | Bin 0 -> 739 bytes sources/htmleditor/images/text-html.png | Bin 0 -> 1097 bytes sources/htmleditor/images/text.png | Bin 0 -> 1185 bytes sources/htmleditor/images/text_color.png | Bin 0 -> 889 bytes sources/htmleditor/inserthtmldialog.ui | 41 ++ sources/htmleditor/qtlogo.png | Bin 0 -> 2205 bytes sources/qetdiagrameditor.cpp | 11 +- sources/qetdiagrameditor.h | 1 + sources/ui/ui_htmleditor.h | 509 ++++++++++++++ sources/ui/ui_inserthtmldialog.h | 78 +++ 46 files changed, 2472 insertions(+), 6 deletions(-) create mode 100644 sources/htmleditor/highlighter.cpp create mode 100644 sources/htmleditor/highlighter.h create mode 100644 sources/htmleditor/htmleditor.cpp create mode 100644 sources/htmleditor/htmleditor.h create mode 100644 sources/htmleditor/htmleditor.qrc create mode 100644 sources/htmleditor/htmleditor.ui create mode 100644 sources/htmleditor/images/bulleted-list.png create mode 100644 sources/htmleditor/images/document-new.png create mode 100644 sources/htmleditor/images/document-open.png create mode 100644 sources/htmleditor/images/document-save-as.png create mode 100644 sources/htmleditor/images/document-save.png create mode 100644 sources/htmleditor/images/edit-copy.png create mode 100644 sources/htmleditor/images/edit-cut.png create mode 100644 sources/htmleditor/images/edit-paste.png create mode 100644 sources/htmleditor/images/edit-redo.png create mode 100644 sources/htmleditor/images/edit-select-all.png create mode 100644 sources/htmleditor/images/edit-undo.png create mode 100644 sources/htmleditor/images/format-indent-less.png create mode 100644 sources/htmleditor/images/format-indent-more.png create mode 100644 sources/htmleditor/images/format-justify-center.png create mode 100644 sources/htmleditor/images/format-justify-fill.png create mode 100644 sources/htmleditor/images/format-justify-left.png create mode 100644 sources/htmleditor/images/format-justify-right.png create mode 100644 sources/htmleditor/images/format-text-bold.png create mode 100644 sources/htmleditor/images/format-text-italic.png create mode 100644 sources/htmleditor/images/format-text-strikethrough.png create mode 100644 sources/htmleditor/images/format-text-underline.png create mode 100644 sources/htmleditor/images/image-x-generic.png create mode 100644 sources/htmleditor/images/insert-html.png create mode 100644 sources/htmleditor/images/list-add.png create mode 100644 sources/htmleditor/images/list-remove.png create mode 100644 sources/htmleditor/images/numbered-list.png create mode 100644 sources/htmleditor/images/text-html.png create mode 100644 sources/htmleditor/images/text.png create mode 100644 sources/htmleditor/images/text_color.png create mode 100644 sources/htmleditor/inserthtmldialog.ui create mode 100644 sources/htmleditor/qtlogo.png create mode 100644 sources/ui/ui_htmleditor.h create mode 100644 sources/ui/ui_inserthtmldialog.h diff --git a/qelectrotech.pro b/qelectrotech.pro index dfe368aff..fb8082c74 100644 --- a/qelectrotech.pro +++ b/qelectrotech.pro @@ -63,11 +63,11 @@ DEPENDPATH += . INCLUDEPATH += sources sources/editor sources/titleblock # Fichiers sources -HEADERS += sources/*.h sources/editor/*.h sources/titleblock/*.h -SOURCES += sources/*.cpp sources/editor/*.cpp sources/titleblock/*.cpp +HEADERS += sources/*.h sources/ui/*.h sources/editor/*.h sources/titleblock/*.h sources/htmleditor/*.h +SOURCES += sources/*.cpp sources/editor/*.cpp sources/titleblock/*.cpp sources/htmleditor/*.cpp # Liste des fichiers qui seront incorpores au binaire en tant que ressources Qt -RESOURCES += qelectrotech.qrc +RESOURCES += qelectrotech.qrc sources/htmleditor/htmleditor.qrc # Liste des ressources Windows RC_FILE = ico/windows_icon/qelectrotech.rc @@ -76,7 +76,12 @@ RC_FILE = ico/windows_icon/qelectrotech.rc TRANSLATIONS += lang/qet_en.ts lang/qet_es.ts lang/qet_fr.ts lang/qet_ru.ts lang/qet_pt.ts lang/qet_cs.ts lang/qet_pl.ts lang/qet_de.ts lang/qet_ro.ts lang/qet_it.ts # Modules Qt utilises par l'application -QT += xml svg network sql +QT += xml svg network sql webkit + +# UI DESIGNER FILES AND GENERATION SOURCES FILES +FORMS = sources/htmleditor/htmleditor.ui sources/htmleditor/inserthtmldialog.ui +UI_SOURCES_DIR = sources/ui/ +UI_HEADERS_DIR = sources/ui/ # Configuration de la compilation CONFIG += debug_and_release warn_on diff --git a/sources/diagramtextitem.cpp b/sources/diagramtextitem.cpp index bce824339..2c1cf042f 100644 --- a/sources/diagramtextitem.cpp +++ b/sources/diagramtextitem.cpp @@ -1,5 +1,5 @@ /* - Copyright 2006-2012 Xavier Guerrin + Copyright 2006-2013 QElectroTech Team This file is part of QElectroTech. QElectroTech is free software: you can redistribute it and/or modify @@ -20,6 +20,7 @@ #include "qet.h" #include "qetapp.h" +#include "htmleditor/htmleditor.h" /** Constructeur @param parent Le QGraphicsItem parent du champ de texte @@ -297,3 +298,29 @@ QPointF DiagramTextItem::pos() const { void DiagramTextItem::setNonFocusable() { setFlag(QGraphicsTextItem::ItemIsFocusable, false); } + + +/** + * @brief DiagramTextItem::setHtmlText + * @param txt + */ +void DiagramTextItem::setHtmlText(const QString &txt) { + setHtml( txt ); +} + +/** + * @brief Edit the text with HtmlEditor + */ +void DiagramTextItem::edit() { + //Open the HtmlEditor + HtmlEditor *editor = new HtmlEditor(); + // connect the in/out + connect(editor, SIGNAL(applyEditText(const QString &)), this, SLOT(setHtmlText(const QString &))); + // load the Html txt + editor->loadHtml( toHtml() ); + // set the minimum controls + editor->setSimpleDisplay(true); + // show + editor->show(); +} + diff --git a/sources/diagramtextitem.h b/sources/diagramtextitem.h index e25c3b661..d85dbeaa5 100644 --- a/sources/diagramtextitem.h +++ b/sources/diagramtextitem.h @@ -53,6 +53,7 @@ class DiagramTextItem : public QGraphicsTextItem { qreal rotationAngle() const; void setRotationAngle(const qreal &); void rotateBy(const qreal &); + void edit(); QPointF mapMovementToScene(const QPointF &) const; QPointF mapMovementFromScene(const QPointF &) const; QPointF mapMovementToParent(const QPointF &) const; @@ -73,6 +74,7 @@ class DiagramTextItem : public QGraphicsTextItem { public slots: void setNonFocusable(); + void setHtmlText(const QString &); private: /// Previous text value diff --git a/sources/diagramview.cpp b/sources/diagramview.cpp index 15a6d76a3..bc316eb51 100644 --- a/sources/diagramview.cpp +++ b/sources/diagramview.cpp @@ -38,6 +38,8 @@ #include "qetmessagebox.h" #include "qtextorientationspinboxwidget.h" +#include "htmleditor/htmleditor.h" + /** Constructeur @param diagram Schema a afficher ; si diagram vaut 0, un nouveau Diagram est utilise @@ -1133,6 +1135,29 @@ void DiagramView::addText() { is_adding_text = true; } + +/** + To edit the text through the htmlEditor +*/ +void DiagramView::editText() { + if (scene -> isReadOnly()) return; + // Get text to edit + QList texts_to_edit; + foreach (QGraphicsItem *item, scene -> selectedItems()) { + if (ConductorTextItem *cti = qgraphicsitem_cast(item)) { + texts_to_edit << cti; + } else if (IndependentTextItem *iti = qgraphicsitem_cast(item)) { + texts_to_edit << iti; + } else if (ElementTextItem *eti = qgraphicsitem_cast(item)) { + // here... + texts_to_edit << eti; + } + } + // Test if any text existe.. + if (texts_to_edit.isEmpty()) return; + else texts_to_edit.at(0)->edit(); +} + /** Cree un nouveau champ de texte et le place a la position pos en gerant l'annulation ; enfin, le signal textAdded est emis. diff --git a/sources/diagramview.h b/sources/diagramview.h index c05763967..da18124c4 100644 --- a/sources/diagramview.h +++ b/sources/diagramview.h @@ -68,6 +68,7 @@ class DiagramView : public QGraphicsView { bool hasCopiableItems(); bool hasDeletableItems(); void addText(); + void editText(); IndependentTextItem *addDiagramTextAtPos(const QPointF &); protected: diff --git a/sources/htmleditor/highlighter.cpp b/sources/htmleditor/highlighter.cpp new file mode 100644 index 000000000..6d1062941 --- /dev/null +++ b/sources/htmleditor/highlighter.cpp @@ -0,0 +1,269 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the Graphics Dojo project on Qt Labs. +** +** This file may be used under the terms of the GNU General Public +** License version 2.0 or 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of +** this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + +#include "highlighter.h" + +#include + +Highlighter::Highlighter(QTextDocument *document) + : QSyntaxHighlighter(document) +{ + m_colors[DocType] = QColor(192, 192, 192); + m_colors[Entity] = QColor(128, 128, 128); + m_colors[Tag] = QColor(136, 18, 128); + m_colors[Comment] = QColor( 35, 110, 37); + m_colors[AttributeName] = QColor(153, 69, 0); + m_colors[AttributeValue] = QColor( 36, 36, 170); +} + +void Highlighter::highlightBlock(const QString &text) +{ + int state = previousBlockState(); + int len = text.length(); + int start = 0; + int pos = 0; + + while (pos < len) { + + switch (state) { + + case State_Text: + default: + + while (pos < len) { + QChar ch = text.at(pos); + if (ch == '<') { + if (text.mid(pos, 4) == "") { + pos += 3; + state = State_Text; + break; + } else { + ++pos; + } + } + setFormat(start, pos - start, m_colors[Comment]); + break; + + case State_DocType: + start = pos; + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + if (ch == '>') { + state = State_Text; + break; + } + } + setFormat(start, pos - start, m_colors[DocType]); + break; + + // at '<' in e.g. "foo" + case State_TagStart: + start = pos + 1; + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + if (ch == '>') { + state = State_Text; + break; + } + if (!ch.isSpace()) { + --pos; + state = State_TagName; + break; + } + } + break; + + // at 'b' in e.g "
foo
" + case State_TagName: + start = pos; + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + if (ch.isSpace()) { + --pos; + state = State_InsideTag; + break; + } + if (ch == '>') { + state = State_Text; + break; + } + } + setFormat(start, pos - start, m_colors[Tag]); + break; + + // anywhere after tag name and before tag closing ('>') + case State_InsideTag: + start = pos; + + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + + if (ch == '/') + continue; + + if (ch == '>') { + state = State_Text; + break; + } + + if (!ch.isSpace()) { + --pos; + state = State_AttributeName; + break; + } + + } + + break; + + // at 's' in e.g. + case State_AttributeName: + start = pos; + + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + + if (ch == '=') { + state = State_AttributeValue; + break; + } + + if (ch == '>' || ch == '/') { + state = State_InsideTag; + break; + } + } + + setFormat(start, pos - start, m_colors[AttributeName]); + break; + + // after '=' in e.g. + case State_AttributeValue: + start = pos; + + // find first non-space character + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + + // handle opening single quote + if (ch == '\'') { + state = State_SingleQuote; + break; + } + + // handle opening double quote + if (ch == '"') { + state = State_DoubleQuote; + break; + } + + if (!ch.isSpace()) + break; + } + + if (state == State_AttributeValue) { + // attribute value without quote + // just stop at non-space or tag delimiter + start = pos; + while (pos < len) { + QChar ch = text.at(pos); + if (ch.isSpace()) + break; + if (ch == '>' || ch == '/') + break; + ++pos; + } + state = State_InsideTag; + setFormat(start, pos - start, m_colors[AttributeValue]); + } + + break; + + // after the opening single quote in an attribute value + case State_SingleQuote: + start = pos; + + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + if (ch == '\'') + break; + } + + state = State_InsideTag; + + setFormat(start, pos - start, m_colors[AttributeValue]); + break; + + // after the opening double quote in an attribute value + case State_DoubleQuote: + start = pos; + + while (pos < len) { + QChar ch = text.at(pos); + ++pos; + if (ch == '"') + break; + } + + state = State_InsideTag; + + setFormat(start, pos - start, m_colors[AttributeValue]); + break; + + } + } + + setCurrentBlockState(state); +} diff --git a/sources/htmleditor/highlighter.h b/sources/htmleditor/highlighter.h new file mode 100644 index 000000000..603433efe --- /dev/null +++ b/sources/htmleditor/highlighter.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the Graphics Dojo project on Qt Labs. +** +** This file may be used under the terms of the GNU General Public +** License version 2.0 or 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of +** this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + +#ifndef HIGHLIGHTER_H +#define HIGHLIGHTER_H + +#include +#include + +// based on http://doc.trolltech.com/qq/qq21-syntaxhighlighter.html + +class Highlighter : public QSyntaxHighlighter +{ + Q_OBJECT + +public: + + Highlighter(QTextDocument *document); + + enum Construct { + DocType, + Entity, + Tag, + Comment, + AttributeName, + AttributeValue + }; + +protected: + enum State { + State_Text = -1, + State_DocType, + State_Comment, + State_TagStart, + State_TagName, + State_InsideTag, + State_AttributeName, + State_SingleQuote, + State_DoubleQuote, + State_AttributeValue, + }; + + void highlightBlock(const QString &text); + +private: + QHash m_colors; +}; + + +#endif // HIGHLIGHTER_H diff --git a/sources/htmleditor/htmleditor.cpp b/sources/htmleditor/htmleditor.cpp new file mode 100644 index 000000000..57e48c26a --- /dev/null +++ b/sources/htmleditor/htmleditor.cpp @@ -0,0 +1,645 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the Graphics Dojo project on Qt Labs. +** +** This file may be used under the terms of the GNU General Public +** License version 2.0 or 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of +** this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + +/** + Integration : QElectroTech Team + Changelog: + - 26/03/2013 : Start integration...Compilation and object creation are successful +*/ + +#include "htmleditor.h" +#include "highlighter.h" + +#include "../ui/ui_htmleditor.h" +#include "../ui/ui_inserthtmldialog.h" + +#include +#include + +#define FORWARD_ACTION(action1, action2) \ + connect(action1, SIGNAL(triggered()), \ + ui->webView->pageAction(action2), SLOT(trigger())); \ + connect(ui->webView->pageAction(action2), \ + SIGNAL(changed()), SLOT(adjustActions())); + + +HtmlEditor::HtmlEditor(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui_MainWindow) + , sourceDirty(true) + , highlighter(0) + , ui_dialog(0) + , insertHtmlDialog(0) +{ + ui->setupUi(this); + ui->tabWidget->setTabText(0, "Normal View"); + ui->tabWidget->setTabText(1, "HTML Source"); + connect(ui->tabWidget, SIGNAL(currentChanged(int)), SLOT(changeTab(int))); + resize(600, 600); + + highlighter = new Highlighter(ui->plainTextEdit->document()); + + QWidget *spacer = new QWidget(this); + spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + ui->standardToolBar->insertWidget(ui->actionZoomOut, spacer); + + zoomLabel = new QLabel; + ui->standardToolBar->insertWidget(ui->actionZoomOut, zoomLabel); + + zoomSlider = new QSlider(this); + zoomSlider->setOrientation(Qt::Horizontal); + zoomSlider->setMaximumWidth(150); + zoomSlider->setRange(25, 400); + zoomSlider->setSingleStep(25); + zoomSlider->setPageStep(100); + connect(zoomSlider, SIGNAL(valueChanged(int)), SLOT(changeZoom(int))); + ui->standardToolBar->insertWidget(ui->actionZoomIn, zoomSlider); + + connect(ui->actionFileNew, SIGNAL(triggered()), SLOT(fileNew())); + connect(ui->actionFileOpen, SIGNAL(triggered()), SLOT(fileOpen())); + connect(ui->actionFileSave, SIGNAL(triggered()), SLOT(fileSave())); + connect(ui->actionFileSaveAs, SIGNAL(triggered()), SLOT(fileSaveAs())); + connect(ui->actionExit, SIGNAL(triggered()), SLOT(close())); + connect(ui->actionInsertImage, SIGNAL(triggered()), SLOT(insertImage())); + connect(ui->actionCreateLink, SIGNAL(triggered()), SLOT(createLink())); + connect(ui->actionInsertHtml, SIGNAL(triggered()), SLOT(insertHtml())); + connect(ui->actionZoomOut, SIGNAL(triggered()), SLOT(zoomOut())); + connect(ui->actionZoomIn, SIGNAL(triggered()), SLOT(zoomIn())); + + // these are forward to internal QWebView + FORWARD_ACTION(ui->actionEditUndo, QWebPage::Undo); + FORWARD_ACTION(ui->actionEditRedo, QWebPage::Redo); + FORWARD_ACTION(ui->actionEditCut, QWebPage::Cut); + FORWARD_ACTION(ui->actionEditCopy, QWebPage::Copy); + FORWARD_ACTION(ui->actionEditPaste, QWebPage::Paste); + FORWARD_ACTION(ui->actionFormatBold, QWebPage::ToggleBold); + FORWARD_ACTION(ui->actionFormatItalic, QWebPage::ToggleItalic); + FORWARD_ACTION(ui->actionFormatUnderline, QWebPage::ToggleUnderline); + + // Qt 4.5.0 has a bug: always returns 0 for QWebPage::SelectAll + connect(ui->actionEditSelectAll, SIGNAL(triggered()), SLOT(editSelectAll())); + + connect(ui->actionStyleParagraph, SIGNAL(triggered()), SLOT(styleParagraph())); + connect(ui->actionStyleHeading1, SIGNAL(triggered()), SLOT(styleHeading1())); + connect(ui->actionStyleHeading2, SIGNAL(triggered()), SLOT(styleHeading2())); + connect(ui->actionStyleHeading3, SIGNAL(triggered()), SLOT(styleHeading3())); + connect(ui->actionStyleHeading4, SIGNAL(triggered()), SLOT(styleHeading4())); + connect(ui->actionStyleHeading5, SIGNAL(triggered()), SLOT(styleHeading5())); + connect(ui->actionStyleHeading6, SIGNAL(triggered()), SLOT(styleHeading6())); + connect(ui->actionStylePreformatted, SIGNAL(triggered()), SLOT(stylePreformatted())); + connect(ui->actionStyleAddress, SIGNAL(triggered()), SLOT(styleAddress())); + connect(ui->actionFormatFontName, SIGNAL(triggered()), SLOT(formatFontName())); + connect(ui->actionFormatFontSize, SIGNAL(triggered()), SLOT(formatFontSize())); + connect(ui->actionFormatTextColor, SIGNAL(triggered()), SLOT(formatTextColor())); + connect(ui->actionFormatBackgroundColor, SIGNAL(triggered()), SLOT(formatBackgroundColor())); + + // no page action exists yet for these, so use execCommand trick + connect(ui->actionFormatStrikethrough, SIGNAL(triggered()), SLOT(formatStrikeThrough())); + connect(ui->actionFormatAlignLeft, SIGNAL(triggered()), SLOT(formatAlignLeft())); + connect(ui->actionFormatAlignCenter, SIGNAL(triggered()), SLOT(formatAlignCenter())); + connect(ui->actionFormatAlignRight, SIGNAL(triggered()), SLOT(formatAlignRight())); + connect(ui->actionFormatAlignJustify, SIGNAL(triggered()), SLOT(formatAlignJustify())); + connect(ui->actionFormatDecreaseIndent, SIGNAL(triggered()), SLOT(formatDecreaseIndent())); + connect(ui->actionFormatIncreaseIndent, SIGNAL(triggered()), SLOT(formatIncreaseIndent())); + connect(ui->actionFormatNumberedList, SIGNAL(triggered()), SLOT(formatNumberedList())); + connect(ui->actionFormatBulletedList, SIGNAL(triggered()), SLOT(formatBulletedList())); + + + // necessary to sync our actions + connect(ui->webView->page(), SIGNAL(selectionChanged()), SLOT(adjustActions())); + + connect(ui->webView->page(), SIGNAL(contentsChanged()), SLOT(adjustSource())); + ui->webView->setFocus(); + + setCurrentFileName(QString()); + + QString initialFile = ":/example.html"; + const QStringList args = QCoreApplication::arguments(); + if (args.count() == 2) + initialFile = args.at(1); + + if (!load(initialFile)) + fileNew(); + + adjustActions(); + adjustSource(); + setWindowModified(false); + changeZoom(100); +} + +HtmlEditor::~HtmlEditor() +{ + delete ui; + delete ui_dialog; +} + +bool HtmlEditor::maybeSave() +{ + if (!isWindowModified()) + return true; + + QMessageBox::StandardButton ret; + ret = QMessageBox::warning(this, tr("HTML Editor"), + tr("The document has been modified.\n" + "Do you want to save your changes?"), + QMessageBox::Save | QMessageBox::Discard + | QMessageBox::Cancel); + if (ret == QMessageBox::Save) + return fileSave(); + else if (ret == QMessageBox::Cancel) + return false; + return true; +} + +void HtmlEditor::fileNew() +{ + if (maybeSave()) { + ui->webView->setHtml("

"); + ui->webView->setFocus(); + ui->webView->page()->setContentEditable(true); + setCurrentFileName(QString()); + setWindowModified(false); + + // quirk in QWebView: need an initial mouse click to show the cursor + int mx = ui->webView->width() / 2; + int my = ui->webView->height() / 2; + QPoint center = QPoint(mx, my); + QMouseEvent *e1 = new QMouseEvent(QEvent::MouseButtonPress, center, + Qt::LeftButton, Qt::LeftButton, + Qt::NoModifier); + QMouseEvent *e2 = new QMouseEvent(QEvent::MouseButtonRelease, center, + Qt::LeftButton, Qt::LeftButton, + Qt::NoModifier); + QApplication::postEvent(ui->webView, e1); + QApplication::postEvent(ui->webView, e2); + } +} + +void HtmlEditor::fileOpen() +{ + QString fn = QFileDialog::getOpenFileName(this, tr("Open File..."), + QString(), tr("HTML-Files (*.htm *.html);;All Files (*)")); + if (!fn.isEmpty()) + load(fn); +} + +bool HtmlEditor::fileSave() +{ + if (fileName.isEmpty() || fileName.startsWith(QLatin1String(":/"))) + return fileSaveAs(); + + QFile file(fileName); + bool success = file.open(QIODevice::WriteOnly); + if (success) { + // FIXME: here we always use UTF-8 encoding + QString content = ui->webView->page()->mainFrame()->toHtml(); + QByteArray data = content.toUtf8(); + qint64 c = file.write(data); + success = (c >= data.length()); + } + + setWindowModified(false); + return success; +} + +bool HtmlEditor::fileSaveAs() +{ + QString fn = QFileDialog::getSaveFileName(this, tr("Save as..."), + QString(), tr("HTML-Files (*.htm *.html);;All Files (*)")); + if (fn.isEmpty()) + return false; + if (!(fn.endsWith(".htm", Qt::CaseInsensitive) || fn.endsWith(".html", Qt::CaseInsensitive))) + fn += ".htm"; // default + setCurrentFileName(fn); + return fileSave(); +} + +void HtmlEditor::insertImage() +{ + QString filters; + filters += tr("Common Graphics (*.png *.jpg *.jpeg *.gif);;"); + filters += tr("Portable Network Graphics (PNG) (*.png);;"); + filters += tr("JPEG (*.jpg *.jpeg);;"); + filters += tr("Graphics Interchange Format (*.gif);;"); + filters += tr("All Files (*)"); + + QString fn = QFileDialog::getOpenFileName(this, tr("Open image..."), + QString(), filters); + if (fn.isEmpty()) + return; + if (!QFile::exists(fn)) + return; + + QUrl url = QUrl::fromLocalFile(fn); + execCommand("insertImage", url.toString()); +} + +// shamelessly copied from Qt Demo Browser +static QUrl guessUrlFromString(const QString &string) +{ + QString urlStr = string.trimmed(); + QRegExp test(QLatin1String("^[a-zA-Z]+\\:.*")); + + // Check if it looks like a qualified URL. Try parsing it and see. + bool hasSchema = test.exactMatch(urlStr); + if (hasSchema) { + QUrl url(urlStr, QUrl::TolerantMode); + if (url.isValid()) + return url; + } + + // Might be a file. + if (QFile::exists(urlStr)) + return QUrl::fromLocalFile(urlStr); + + // Might be a shorturl - try to detect the schema. + if (!hasSchema) { + int dotIndex = urlStr.indexOf(QLatin1Char('.')); + if (dotIndex != -1) { + QString prefix = urlStr.left(dotIndex).toLower(); + QString schema = (prefix == QLatin1String("ftp")) ? prefix : QLatin1String("http"); + QUrl url(schema + QLatin1String("://") + urlStr, QUrl::TolerantMode); + if (url.isValid()) + return url; + } + } + + // Fall back to QUrl's own tolerant parser. + return QUrl(string, QUrl::TolerantMode); +} + +void HtmlEditor::createLink() +{ + QString link = QInputDialog::getText(this, tr("Create link"), + "Enter URL"); + if (!link.isEmpty()) { + QUrl url = guessUrlFromString(link); + if (url.isValid()) + execCommand("createLink", url.toString()); + } +} + +void HtmlEditor::insertHtml() +{ + if (!insertHtmlDialog) { + insertHtmlDialog = new QDialog(this); + if (!ui_dialog) + ui_dialog = new Ui_Dialog; + ui_dialog->setupUi(insertHtmlDialog); + connect(ui_dialog->buttonBox, SIGNAL(accepted()), + insertHtmlDialog, SLOT(accept())); + connect(ui_dialog->buttonBox, SIGNAL(rejected()), + insertHtmlDialog, SLOT(reject())); + } + + ui_dialog->plainTextEdit->clear(); + ui_dialog->plainTextEdit->setFocus(); + Highlighter *hilite = new Highlighter(ui_dialog->plainTextEdit->document()); + + if (insertHtmlDialog->exec() == QDialog::Accepted) + execCommand("insertHTML", ui_dialog->plainTextEdit->toPlainText()); + + delete hilite; +} + +void HtmlEditor::zoomOut() +{ + int percent = static_cast(ui->webView->zoomFactor() * 100); + if (percent > 25) { + percent -= 25; + percent = 25 * (int((percent + 25 - 1) / 25)); + qreal factor = static_cast(percent) / 100; + ui->webView->setZoomFactor(factor); + ui->actionZoomOut->setEnabled(percent > 25); + ui->actionZoomIn->setEnabled(true); + zoomSlider->setValue(percent); + } +} + +void HtmlEditor::zoomIn() +{ + int percent = static_cast(ui->webView->zoomFactor() * 100); + if (percent < 400) { + percent += 25; + percent = 25 * (int(percent / 25)); + qreal factor = static_cast(percent) / 100; + ui->webView->setZoomFactor(factor); + ui->actionZoomIn->setEnabled(percent < 400); + ui->actionZoomOut->setEnabled(true); + zoomSlider->setValue(percent); + } +} + +void HtmlEditor::editSelectAll() +{ + ui->webView->triggerPageAction(QWebPage::SelectAll); +} + +void HtmlEditor::execCommand(const QString &cmd) +{ + QWebFrame *frame = ui->webView->page()->mainFrame(); + QString js = QString("document.execCommand(\"%1\", false, null)").arg(cmd); + frame->evaluateJavaScript(js); +} + +void HtmlEditor::execCommand(const QString &cmd, const QString &arg) +{ + QWebFrame *frame = ui->webView->page()->mainFrame(); + QString js = QString("document.execCommand(\"%1\", false, \"%2\")").arg(cmd).arg(arg); + frame->evaluateJavaScript(js); +} + +bool HtmlEditor::queryCommandState(const QString &cmd) +{ + QWebFrame *frame = ui->webView->page()->mainFrame(); + QString js = QString("document.queryCommandState(\"%1\", false, null)").arg(cmd); + QVariant result = frame->evaluateJavaScript(js); + return result.toString().simplified().toLower() == "true"; +} + +void HtmlEditor::styleParagraph() +{ + execCommand("formatBlock", "p"); +} + +void HtmlEditor::styleHeading1() +{ + execCommand("formatBlock", "h1"); +} + +void HtmlEditor::styleHeading2() +{ + execCommand("formatBlock", "h2"); +} + +void HtmlEditor::styleHeading3() +{ + execCommand("formatBlock", "h3"); +} + +void HtmlEditor::styleHeading4() +{ + execCommand("formatBlock", "h4"); +} + +void HtmlEditor::styleHeading5() +{ + execCommand("formatBlock", "h5"); +} + +void HtmlEditor::styleHeading6() +{ + execCommand("formatBlock", "h6"); +} + +void HtmlEditor::stylePreformatted() +{ + execCommand("formatBlock", "pre"); +} + +void HtmlEditor::styleAddress() +{ + execCommand("formatBlock", "address"); +} + +void HtmlEditor::formatStrikeThrough() +{ + execCommand("strikeThrough"); +} + +void HtmlEditor::formatAlignLeft() +{ + execCommand("justifyLeft"); +} + +void HtmlEditor::formatAlignCenter() +{ + execCommand("justifyCenter"); +} + +void HtmlEditor::formatAlignRight() +{ + execCommand("justifyRight"); +} + +void HtmlEditor::formatAlignJustify() +{ + execCommand("justifyFull"); +} + +void HtmlEditor::formatIncreaseIndent() +{ + execCommand("indent"); +} + +void HtmlEditor::formatDecreaseIndent() +{ + execCommand("outdent"); +} + +void HtmlEditor::formatNumberedList() +{ + execCommand("insertOrderedList"); +} + +void HtmlEditor::formatBulletedList() +{ + execCommand("insertUnorderedList"); +} + +void HtmlEditor::formatFontName() +{ + QStringList families = QFontDatabase().families(); + bool ok = false; + QString family = QInputDialog::getItem(this, tr("Font"), tr("Select font:"), + families, 0, false, &ok); + + if (ok) + execCommand("fontName", family); +} + +void HtmlEditor::formatFontSize() +{ + QStringList sizes; + sizes << "xx-small"; + sizes << "x-small"; + sizes << "small"; + sizes << "medium"; + sizes << "large"; + sizes << "x-large"; + sizes << "xx-large"; + + bool ok = false; + QString size = QInputDialog::getItem(this, tr("Font Size"), tr("Select font size:"), + sizes, sizes.indexOf("medium"), false, &ok); + + if (ok) + execCommand("fontSize", QString::number(sizes.indexOf(size))); +} + +void HtmlEditor::formatTextColor() +{ + QColor color = QColorDialog::getColor(Qt::black, this); + if (color.isValid()) + execCommand("foreColor", color.name()); +} + +void HtmlEditor::formatBackgroundColor() +{ + QColor color = QColorDialog::getColor(Qt::white, this); + if (color.isValid()) + execCommand("hiliteColor", color.name()); +} + +#define FOLLOW_ENABLE(a1, a2) a1->setEnabled(ui->webView->pageAction(a2)->isEnabled()) +#define FOLLOW_CHECK(a1, a2) a1->setChecked(ui->webView->pageAction(a2)->isChecked()) + +void HtmlEditor::adjustActions() +{ + FOLLOW_ENABLE(ui->actionEditUndo, QWebPage::Undo); + FOLLOW_ENABLE(ui->actionEditRedo, QWebPage::Redo); + FOLLOW_ENABLE(ui->actionEditCut, QWebPage::Cut); + FOLLOW_ENABLE(ui->actionEditCopy, QWebPage::Copy); + FOLLOW_ENABLE(ui->actionEditPaste, QWebPage::Paste); + FOLLOW_CHECK(ui->actionFormatBold, QWebPage::ToggleBold); + FOLLOW_CHECK(ui->actionFormatItalic, QWebPage::ToggleItalic); + FOLLOW_CHECK(ui->actionFormatUnderline, QWebPage::ToggleUnderline); + + ui->actionFormatStrikethrough->setChecked(queryCommandState("strikeThrough")); + ui->actionFormatNumberedList->setChecked(queryCommandState("insertOrderedList")); + ui->actionFormatBulletedList->setChecked(queryCommandState("insertUnorderedList")); +} + +void HtmlEditor::adjustSource() +{ + setWindowModified(true); + sourceDirty = true; + + if (ui->tabWidget->currentIndex() == 1) + changeTab(1); +} + +void HtmlEditor::changeTab(int index) +{ + if (sourceDirty && (index == 1)) { + QString content = ui->webView->page()->mainFrame()->toHtml(); + ui->plainTextEdit->setPlainText(content); + sourceDirty = false; + } +} + +void HtmlEditor::openLink(const QUrl &url) +{ + QString msg = QString(tr("Open %1 ?")).arg(url.toString()); + if (QMessageBox::question(this, tr("Open link"), msg, + QMessageBox::Open | QMessageBox::Cancel) == + QMessageBox::Open) + QDesktopServices::openUrl(url); +} + +void HtmlEditor::changeZoom(int percent) +{ + ui->actionZoomOut->setEnabled(percent > 25); + ui->actionZoomIn->setEnabled(percent < 400); + qreal factor = static_cast(percent) / 100; + ui->webView->setZoomFactor(factor); + + zoomLabel->setText(tr(" Zoom: %1% ").arg(percent)); + zoomSlider->setValue(percent); +} + +/** + * @brief HtmlEditor::closeEvent and send a applyEditText signal! + * @param e + */ +void HtmlEditor::closeEvent(QCloseEvent *e) +{ + /*if (maybeSave()) + e->accept(); + else + e->ignore();*/ + + //start applyEdit + emit applyEditText( ui->webView->page()->mainFrame()->toHtml() ); +} + +/** + * @brief HtmlEditor::loadHtml to the editor + * @param f + */ +void HtmlEditor::loadHtml(const QString &f) { + ui->webView->setContent(f.toAscii(), "text/html"); + ui->webView->page()->setContentEditable(true); + ui->webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); + connect(ui->webView, SIGNAL(linkClicked(QUrl)), SLOT(openLink(QUrl))); + +} + +/** + * @brief HtmlEditor::setSimpleDisplay + * @param state + */ +void HtmlEditor::setSimpleDisplay(bool state) { + ui->standardToolBar->setVisible(!state); + ui->menubar->setVisible(!state); +} + +bool HtmlEditor::load(const QString &f) +{ + if (!QFile::exists(f)) + return false; + QFile file(f); + if (!file.open(QFile::ReadOnly)) + return false; + + QByteArray data = file.readAll(); + ui->webView->setContent(data, "text/html"); + ui->webView->page()->setContentEditable(true); + ui->webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); + connect(ui->webView, SIGNAL(linkClicked(QUrl)), SLOT(openLink(QUrl))); + + setCurrentFileName(f); + return true; +} + +void HtmlEditor::setCurrentFileName(const QString &fileName) +{ + this->fileName = fileName; + // setWindowModified(false); + + QString shownName; + if (fileName.isEmpty()) + shownName = "untitled"; + else + shownName = QFileInfo(fileName).fileName(); + + setWindowTitle(tr("%1[*] - %2").arg("QET").arg(tr("HTML Editor"))); + setWindowModified(false); + + bool allowSave = true; + if (fileName.isEmpty() || fileName.startsWith(QLatin1String(":/"))) + allowSave = false; + ui->actionFileSave->setEnabled(allowSave); +} + + diff --git a/sources/htmleditor/htmleditor.h b/sources/htmleditor/htmleditor.h new file mode 100644 index 000000000..613626009 --- /dev/null +++ b/sources/htmleditor/htmleditor.h @@ -0,0 +1,122 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the Graphics Dojo project on Qt Labs. +** +** This file may be used under the terms of the GNU General Public +** License version 2.0 or 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of +** this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + + +#ifndef HTML_EDITOR_H +#define HTML_EDITOR_H + +#include +#include "highlighter.h" + +#if QT_VERSION < 0x040500 +#error You must use Qt >= 4.5.0! +#endif + +class Ui_MainWindow; +class Ui_Dialog; + +class QLabel; +class QSlider; +class QUrl; + +class HtmlEditor : public QMainWindow +{ + Q_OBJECT + +public: + HtmlEditor(QWidget *parent = 0); + ~HtmlEditor(); + + void loadHtml(const QString &f); + void setSimpleDisplay(bool state); + +protected: + virtual void closeEvent(QCloseEvent *e); + +private: + void setupActions(); + void setupToolBar(); + void setupMenu(); + bool load(const QString &f); + bool maybeSave(); + void setCurrentFileName(const QString &fileName); + void execCommand(const QString&); + void execCommand(const QString &cmd, const QString &arg); + bool queryCommandState(const QString&); + +private slots: + void fileNew(); + void fileOpen(); + bool fileSave(); + bool fileSaveAs(); + void editSelectAll(); + void styleParagraph(); + void styleHeading1(); + void styleHeading2(); + void styleHeading3(); + void styleHeading4(); + void styleHeading5(); + void styleHeading6(); + void stylePreformatted(); + void styleAddress(); + void formatStrikeThrough(); + void formatAlignLeft(); + void formatAlignCenter(); + void formatAlignRight(); + void formatAlignJustify(); + void formatIncreaseIndent(); + void formatDecreaseIndent(); + void formatNumberedList(); + void formatBulletedList(); + void formatFontName(); + void formatFontSize(); + void formatTextColor(); + void formatBackgroundColor(); + void insertImage(); + void createLink(); + void insertHtml(); + void zoomOut(); + void zoomIn(); + void adjustActions(); + void adjustSource(); + void changeTab(int); + void openLink(const QUrl&); + void changeZoom(int); + +signals: + void applyEditText(const QString &); + +private: + Ui_MainWindow *ui; + QString fileName; + bool sourceDirty; + QLabel *zoomLabel; + QSlider *zoomSlider; + Highlighter *highlighter; + Ui_Dialog *ui_dialog; + QDialog *insertHtmlDialog; + + +}; + +#endif // HTML_EDITOR_H diff --git a/sources/htmleditor/htmleditor.qrc b/sources/htmleditor/htmleditor.qrc new file mode 100644 index 000000000..5207a22fa --- /dev/null +++ b/sources/htmleditor/htmleditor.qrc @@ -0,0 +1,33 @@ + + + images/document-new.png + images/document-open.png + images/document-save.png + images/edit-copy.png + images/edit-cut.png + images/edit-paste.png + images/edit-redo.png + images/edit-select-all.png + images/edit-undo.png + images/format-indent-less.png + images/format-indent-more.png + images/format-justify-center.png + images/format-justify-fill.png + images/format-justify-left.png + images/format-justify-right.png + images/format-text-bold.png + images/format-text-italic.png + images/format-text-underline.png + images/format-text-strikethrough.png + images/bulleted-list.png + images/numbered-list.png + images/image-x-generic.png + qtlogo.png + images/text-html.png + images/list-remove.png + images/list-add.png + images/insert-html.png + images/text.png + images/text_color.png + + diff --git a/sources/htmleditor/htmleditor.ui b/sources/htmleditor/htmleditor.ui new file mode 100644 index 000000000..c02d37862 --- /dev/null +++ b/sources/htmleditor/htmleditor.ui @@ -0,0 +1,629 @@ + + + MainWindow + + + + 0 + 0 + 659 + 398 + + + + HTML Editor + + + + + 0 + + + + + QTabWidget::South + + + QTabWidget::Rounded + + + 0 + + + true + + + + Tab 1 + + + + 0 + + + + + + about:blank + + + + + + + + + Tab 2 + + + + 0 + + + + + QFrame::NoFrame + + + true + + + + + + + + + + + + + 0 + 0 + 659 + 31 + + + + + &File + + + + + + + + + + + &Edit + + + + + + + + + + + + + + + + + F&ormat + + + + St&yle + + + + + + + + + + + + + + &Align + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + Standard + + + + 24 + 24 + + + + TopToolBarArea + + + false + + + + + + + + + + + + + + + + + + Formatting + + + + 24 + 24 + + + + TopToolBarArea + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + :/images/document-new.png:/images/document-new.png + + + &New + + + Ctrl+N + + + + + + :/images/document-open.png:/images/document-open.png + + + &Open... + + + Ctrl+O + + + + + + :/images/document-save.png:/images/document-save.png + + + &Save + + + Ctrl+S + + + + + Save &As... + + + + + + :/images/edit-undo.png:/images/edit-undo.png + + + &Undo + + + Ctrl+Z + + + + + + :/images/edit-redo.png:/images/edit-redo.png + + + &Redo + + + Ctrl+Y + + + + + + :/images/edit-cut.png:/images/edit-cut.png + + + Cu&t + + + Ctrl+X + + + + + + :/images/edit-copy.png:/images/edit-copy.png + + + &Copy + + + Ctrl+C + + + + + + :/images/edit-paste.png:/images/edit-paste.png + + + &Paste + + + Ctrl+V + + + + + + :/images/edit-select-all.png:/images/edit-select-all.png + + + Select A&ll + + + Ctrl+A + + + + + true + + + + :/images/format-text-bold.png:/images/format-text-bold.png + + + &Bold + + + Ctrl+B + + + + + true + + + + :/images/format-text-italic.png:/images/format-text-italic.png + + + &Italic + + + Ctrl+I + + + + + true + + + + :/images/format-text-underline.png:/images/format-text-underline.png + + + &Underline + + + Ctrl+U + + + + + true + + + + :/images/format-text-strikethrough.png:/images/format-text-strikethrough.png + + + &Strikethrough + + + + + + :/images/format-justify-left.png:/images/format-justify-left.png + + + Align &Left + + + + + + :/images/format-justify-center.png:/images/format-justify-center.png + + + Align &Center + + + + + + :/images/format-justify-right.png:/images/format-justify-right.png + + + Align &Right + + + + + + :/images/format-justify-fill.png:/images/format-justify-fill.png + + + Align &Justify + + + + + + :/images/format-indent-more.png:/images/format-indent-more.png + + + I&ncrease Indent + + + + + + :/images/format-indent-less.png:/images/format-indent-less.png + + + &Decrease Indent + + + + + true + + + + :/images/bulleted-list.png:/images/bulleted-list.png + + + Bulle&ted List + + + + + true + + + + :/images/numbered-list.png:/images/numbered-list.png + + + &Numbered List + + + + + + :/images/image-x-generic.png:/images/image-x-generic.png + + + Insert &Image... + + + false + + + + + + :/images/text-html.png:/images/text-html.png + + + Create Link... + + + + + + :/images/list-remove.png:/images/list-remove.png + + + Zoom Out + + + + + + :/images/list-add.png:/images/list-add.png + + + Zoom In + + + + + E&xit + + + Ctrl+Q + + + + + &Paragraph + + + + + Heading &1 + + + + + Heading &2 + + + + + Heading &3 + + + + + Heading &4 + + + + + Heading &5 + + + + + Heading &6 + + + + + Pre&formatted + + + + + &Address + + + + + &Font Name... + + + + + + :/images/text_color.png:/images/text_color.png + + + Text &Color... + + + + + Bac&kground Color... + + + + + + :/images/text.png:/images/text.png + + + Font Si&ze... + + + + + + :/images/insert-html.png:/images/insert-html.png + + + Insert HTML... + + + Insert HTML + + + + + + QWebView + QWidget +
QtWebKit/QWebView
+
+
+ + + + +
diff --git a/sources/htmleditor/images/bulleted-list.png b/sources/htmleditor/images/bulleted-list.png new file mode 100644 index 0000000000000000000000000000000000000000..69708f1c4167e8ceaa7bc281e9832c109cbbd0b5 GIT binary patch literal 678 zcmV;X0$KfuP)Px#24YJ`L;#BbjR1%>`?);;00K@)L_t(I%dJ(>YScg!JvW=gx^}6L_0|53A0P#h zYPGep)Jj1F-z#eui|e}9(kcj|79RyasSmawm2EaNnLF2qY_ge6c5BfCf#l}Sx%Zsh znUIL!Mf00_hIE5-3Z;#gt-{X6(kG=Neuass7d z!4Sq6?C$kaGGiFb2F5UqF#wRhIQX!~D1eB5EiG0FnliB!Mvo z%nW8ugGy;IGptR!@jKlet||loPO))_2;RJXJ!${|y1fq8n;Yo%I!^NH{WSo9S6rP* z7>Cx0o16twc`lMfyFH(roWNQOYb`_sB6fJC_lMsOK|8P7U$oYXI0sLkJR@Igz4-Xi z=G4S6yyW&g2}v>%>=$jT!h@BE<>d9|2ADaw&)QU&*81<6mu@e+$;^zk)h0yj&^~c& zEG6&l?^ZG|-n=!QY_WW2C1+wb!+|vbY?;~pda1bL%m9EN1i|-DpFiF>&+m=(&2(jJ zdrSTo+AmuoBJS)@+bq*I(Qs}tGjqB8{l+&}aR{o(ikIuzMB+)E6_HI`s#Kv?^Djos z%(>J_of3IYp%QVnz$LbYcr|g=I=|fA_>n6hN(*EMY89;IixF#`lq|^9F(-xM-uc9L zm+s{5m=7n<7f+}u_C3y8@5lPoM;_vf$8&mI3fu1AAGJ<+;ujHxr*S!;RL zTDc-(8zKmZND)!r^Sr+2d1tj+t?vhZ6ox_6m~Hfrj*fnvp8k&i0JlO+q%(Fov;Y7A M07*qoM6N<$f_nNrBme*a literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/document-new.png b/sources/htmleditor/images/document-new.png new file mode 100644 index 0000000000000000000000000000000000000000..e3808a108e335b14e13711783a3717f7b6013375 GIT binary patch literal 692 zcmV;l0!#ggP);y z08cd6u?+wK010qNS#tmY4c7nw4c7reD4Tcy000McNliru)dCU@B{0fECJ6ul0zpYc zK~y-)t(DDd6JZdCpPAiMn&Jmdn>7fYJcxJ_#8&Vh@X~`PZ{pRn2x2dy;>SPX!Ham1 z+(i)tHKi8|da}9HkQgW;F{asM$HRVRQ|)SfA!K*h_jzZ2znNWOpKH`v5ugP4u2;7> zF7d_vhj(uStA7Jk38)+yP+RQbsIfED#}_X&uen~m?`ED`y>b0!VW^o8{zroTOMI(f zl-d6J>5AdJ8g*8ly7>*wW)sJ8Ff&91k+7)jH5esnQPvkYrCDs|65`BrXyG*$Ji9FR zZC&%=7!X6u49qYyEHKOf#;EiV*}-H1bRJOP05C2ChxY^{Kpay+6+|2YIY_`FGTH?H z4FnyAg9c(hHh}Hlf>kyA7ePeR!$eVW2sp}sWrlVFhHJR~b2dM3Ap}o=mb)8RRa1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!^Gg%N(Y>yRJWM=AgI&$DQBoaw5Gfxa| zHh)H-herpGZf^eM0fZm~A~V3t^_5{65)pllfQ!XK@ZIw~`E}<@e(~uNF*8lPs6?o2 ztj>-!R$YZ#Q@XxxO_e_Y9%Oq#_zDy>AY&Hu3$mMbYD+Kmoz6C|Vj#G>P0frC~Qc7s8 zA%uWG``g7cJ0P7-2aymFY}+1KECNw~7udE9B4O+-D_Fd0Z5LW=Sau@u$S#kdYD{C*72J`o)&&(zUFlO)G2LN1NUEuKh0hq95jXVG0 z{B7HUl;#yH;UH$AF;6 z<+=F}=GKmRDjTbxy4~)B!JDgph#3rM0jg^7z2(K{fBo7&#+023nteo900000NkvXX Hu0mjfy%<3* literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/edit-cut.png b/sources/htmleditor/images/edit-cut.png new file mode 100644 index 0000000000000000000000000000000000000000..7017d1b3c05602eae02c4e24ee0dd623a4a988b9 GIT binary patch literal 1177 zcmV;K1ZMk*P)@nd7muDXRbu{1HZCDn+AB-+xJK7@d@6iHtMr8cef zK?O^Tg+P)9v=kwvArB!GKZ3D_k`_~mX^OQEH6J?YG_mrPO`;?5S&M!A__1!#7@klXwfCgN@p>Z!ezjNCo|-yQ{~& z%gwU3XX8-SVeHJ?xi2l4bMDT~aRC6T4jl%7_7oNr#pCgJ%gZVtgn*`Lh(sd=X~FS$ zd}`?WHOp?dLtzT?^73t0zPmiKJ|{CXbMRn!1vnR=l;YOt&j^J=t!cpkjx9Z1BDx-f zloBQT_9Gk)9a&dxr4XXj<1U1h5>FPNARaeX+gjSY(t_Js+8+bBG&nRMolYmDlz4gn ztLW?Rc?19%85utuJyHYCIT&LYy*+|hELxiC9g-_XTT6SruIqt^f8Cda5ai~%5DEo% zU%YgoYx}mWt(xk9loAtn|A4Bhy@_Hr2Pf3{+xQsSvgH}%V0k4nGc!LaC@g}M5|k3m z&CePqo0{L-XdF|5+gjRtEz27H<<4!(X0t(26sW2O!8r&a_-Xh@ghHX}baPJA#6I|E z`fmv$A*Dp|?iUe>gfTrc4Q8`FNVk;$VB08gb9f|BU31j&-_%rPaY-pm(}ZCd@IQQj z6OBzfu!+)DjN;EajQGq9CjXp3ad9z;g+f@GdW1o{y<;;lN&ayK@NUzz4oXOEoO5mO z-j|5q;lRJ+zoVe+HRQx%n4G*XRmOBn%Km_^e^Cd_qy-P!?Tw1f_IXiOR=%bvQ0TLU z#%E_`B3G6b77_q3EepD7;_=Fg&lKXzV}@})r4<7nca4y;b&t!HzZ#4ACw;yZe>954 za2SRVXISm=3x*J97QnAFUVkKl#c;UK z5Te_mC|C#vVF7oK_w+Xam{N!+rip1QlMd7tv^aYOrZOuQ7&*Velm( zhE&EHoOU}XA@e7I>j1Pm;Co8Qywh%n%2>ma5JM5e;2L9)hVjCBYuVZb#N?i!u4AjF zp@gv;p6qN)EG#U|a^45P4L}0GEa$!O`RZQrcy`P!FW*oY<3U{q<-!d>17HFWG;s^H zGj@3{5I}~aFo&w*p3jG6DS!Ql^L_x?iObk1Yj}N13*pe z1|jPfg-sqWe63=VG)_f&`LnWx)TYzECBc)r|Z?9gzmJw00000NkvXXu0mjfHJ>47 literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/edit-paste.png b/sources/htmleditor/images/edit-paste.png new file mode 100644 index 0000000000000000000000000000000000000000..f6a625ce0c201664218344077ac47171e3437933 GIT binary patch literal 773 zcmV+g1N!`lP)1v7=gySn zH0n71Btjr4xeIgQCMlI#aXhER{OgQ^dEs)t^YcBt_x%p{6I6JHhlf7`z5AADCnqN_AC@NyCw@QL z@+=O3WaIS<`iV2|rBt4-t`3AqA5}`Ru<#vC6OmLRHslDsn+G`8OVaO09srN_+3qOh zb1A6?_*>hfHMaMN*4D<7idI)6tpAu(CpYJ$0yKf8q;~JchrPD|dRFPyXZdXCQkyHZ z+rU?|lO1ypx7$NoTYFAJT6B6$Bw&5LLsYe#w{@Rc!bQk6J@<1Q$b*+>aX58q>~@X$ z%}#s|pI}4{#>bzsxVThOvC~Ml*zNYR`%0;TNd<7>{>;qGAyDY=_mKF zbM_ZBIXGVN=2EfS6#-HJj$p%rUuzp<=s;_*02$>V}$MzLaL|EsJnCjLO_y(=-W%)|q%c!L_D^^5AUQPCF!# zjR?)nExAK2`;rVJS_E}Fwks=cmERb9>?5AkDm52wwS3`}Em_`*H?t&0ud-?Fq&yeT z8g#2q9Cp7;^`WSh0#x`w2f2HN8$#1wqLimZ+Y;seMfpH%$*RV{Zd328U~p>ZK*Gq# z?JA%Kr~~Q&573Z_oj@Ge0ycmM@CVq;jIm&FN&@@?USWreIVMnR00000NkvXXu0mjf D-0Nc} literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/edit-redo.png b/sources/htmleditor/images/edit-redo.png new file mode 100644 index 0000000000000000000000000000000000000000..576cfc76c6b8868e648ad44ad39afc63b8bf8e81 GIT binary patch literal 810 zcmV+_1J(SAP)Mk1> z`U_^^N1>pg6c@#|3$fG|YiXJ$n2F6tGdDB$x=F%hn54CM;4pB{;W_WTbLIm77_qo6 zV{!f9ZhZ{ofC*eB7tyf0KEy|{q6Bl6k1*U$y(rY z2aFL&C2-pYQwdhG0AfHi8m+>^rooGW;8$_?B@bLP4eqD`f?r&{blN6RC}nLzy7fhuY^Vysu|@671MM;m?f^g#cuMw$kj$?_ zQ5d>A4+CJ(C~dZG+SEm;EocaB zvd4tBj#g}?6LMyDISb&7X>c+PP5_{g))d+htUyIX8Int%vo3(Uroq2^>$Y2{LXQPO z8(Lw@oLiEr10ZxN!N2*p#{=Ei>n}|JR*%lRxj&^e0O08pBrAPX9l#6nxM}c&_pF&> z0zgvAFTbsY3Bs_bIpYb_;JQzg^krSKI+^7+@pyVi>2zE!)lw)s`AoZCfvdjMDo@4# zMqV{kDYBm*MDgSemP)K;Vi(4vBDs+nvsPuimx<#A6Rc6a_=1(VL#SBii8JN1u7Mw@YEpiqcE2IvN2)jB=4-W`}#p z$^MeIaB2_{04DN*na7rz?<0?t?!I&E4l(pe7h4Oj+}FaDqDLqq(obrrMT(7exidfK oI@KW*ux>%w=!*4jL!A|W0rDI=0Gne09{>OV07*qoM6N<$g6d&rbN~PV literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/edit-select-all.png b/sources/htmleditor/images/edit-select-all.png new file mode 100644 index 0000000000000000000000000000000000000000..e6331c6e9b996a186d54116bdb0280b70ea60908 GIT binary patch literal 645 zcmV;00($+4P)D zl|7HsKoEwXiK8TZ2m&ZI1t+8^aZ*qq!AS^FQBc5tphhQwkmwJNMB!-YDES9mOAoZR z<0u6Yw6v!viPs*AVB=3XZluwA$GgwIGdq?=Rf+BO_+=9iPG|c3*^6~Nsl^YI!_hln z2^<5*BJy7jEZ@8xfB18ZDyquCXkWuHRAY=9V>F5)4Z|?;IBty5AP6)F0^MvjiLcjd z9gSZF2c!Lqs!Bbbi-@pTENC{Hgkgw?AR@`T^q99!r-RfaB;1y=o?jp$eEzm1ilRzb zetv7`eBq!{Fu-g!%fx%V9WhN(53=l<8W}Y7{%i>P=QYrMW;Cxr) zZ8#hjI;0Yu?uxh+Rf$*I=eGSKPD!Zssar{N4)rtrozkKJx&8r-J{gF|BBCv>Hj46QY z^?H)_J-burph|H166W)HVXyopEyI0Kvo&i(cVux9&j fjD4l5tNi|7!U+Lk41T1`00000NkvXXu0mjfGwmdp literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/edit-undo.png b/sources/htmleditor/images/edit-undo.png new file mode 100644 index 0000000000000000000000000000000000000000..f37c6963d5a09fca4392a9c624171b6ebd8ed75f GIT binary patch literal 1011 zcmVTE&9H7IvbZ+cqG6s%a3~8qyOAA9sH1p3h*yWIRf(}TT_~f(C;C};eLubYT zdu`WXWhbb`N1!U*0DeU>2Hvo6!?f^IgOT&sH`K)G_nOsCV7VQX(^bIpI0&KGGpZvz z7Dg~^g!=q)rI;`6edIy=#qfmsLn6sa9l;kCM-By$UY?v8N8K8OPu|D5zr&u0tdwe|HPw60!GtvqM83Cg^n%=@1wQ3jwc zeiV8k83PxWkjEA3x3NGm|N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7gEt@SXAjuCNKs7N^MW9&C@TRmok04Rn^5;YfK3U0x~?PB;DDr!Eqei ztyFv;)T0tJSI~$92N7d55!68Y?R_}T&xnai766i~fmI&0Zc2BCowhq|I9(^ySno60 zyy5T{27>_xuK&0L7q08VyYTe6&YKQetrjX)MTK-BZgY$okwN8k`Lb;r-EJ3B5~N%h zkhsQre5D5ElJINr0~@_wFOv5J^YjERX>Wct>P=Xd^?!}^fxyHh+-AK2%PPk%sf4?N zSTC-lc)N(r`;*>HKx9cqq+k` zbFYrFWyQ==9myodYiqX>%_(^b literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/format-justify-center.png b/sources/htmleditor/images/format-justify-center.png new file mode 100644 index 0000000000000000000000000000000000000000..0777a9adfb643d7a51720e6e7a1341b3dc0f2f04 GIT binary patch literal 506 zcmVT zlgnztKoo}08IxF2rMR=(`Zg^JLKaa&eS}izD-@(xq)%Wi+KsD1AIU{s6iezQ)%m*+ z6LT?%tp|pXWagXi{KGH+dTihI9mg?g52b0^>*d8&jQ~*V<{JB|+xr#(kg~bkd_McL zDFDi558QVpW^QUAKtu%J_egN3^Sl$>vKj=W05_ZGv7nWuH>5;5a59jH2%!y9fz!re zn&xg`%W4EHJzEb10_1LBA;iXHCgvcV2w*qgMDTh70P1#MVnQG?41>I^{r`O6VB7V2 zEu!`9V=Gun>4KsmQJH%kCK~s8{n!YCRjE`c_U5gP4a11A-e&7P6ODyn_taMl{0o^m z0F_A@`)vk;L2Lx&@|o`z#u!Uq>(y#CqHPZpjw7XU_|(IoRNz9P5ZiiEF|!}6s_I+& z>EZNWR1f}6M8p87R60?L$Hk-3$4H+{r}~fM=!?ZdUoK@%%4JSU90D>Akjl(+X10Y8 wwh-bwlgZeMs!TLZo#bliKU$b zl*>-SP!NV^PA`}WG3;rE;nU*Xw6%A+AdALnP%I#nFI7L_zpJSy3*R z)!=Hi5~6accB#;tmuj%4X+EGEOw2(z5y0eb1J-*S*NQ@+5Do@FwOTb|>;7+2Dy)!F zE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;++iko!)P~E}bm^!0OW30+HgT zX+Gl26A+;24TYp=()qpMcDYSYUsCOnA@kgar=mHFLAUC-x3=yS3dP{wphMw^GnjlX z$hm~;?jWB{Tj8vcSXsH)F1>bx6o+Foho9;9gQ(cHstEd3y#MA@Q1dAW_!MY<3eB&e z=dlNWxV??v{#v_B-}<5X1M__Bs?L(xdayg zZ|@~UtG7atL?1IUi~GQ1vzJr70d2H5bO_mpE-KY3*6!Z%gp^%do)F>HW3!i2_pYD6(*~kU(&_t;)qpS~y>f$)^9cY-%SnqV0r2S9sqY7mzwxnC zGJ9I*3ZZm@5JIGsa^Dalgpd|wx9=`Xxywash1>(`INkmW`~Q7Se*xj7g!G23{yYEx N002ovPDHLkV1j)z!vg>S literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/format-text-italic.png b/sources/htmleditor/images/format-text-italic.png new file mode 100644 index 0000000000000000000000000000000000000000..ef68fb340456bd5223aefabf77f570df65460f0a GIT binary patch literal 784 zcmV+r1MmEaP)* zmD@{HQ543%ea@UY=P>0pZLk#6H1dLs_X$BN3ZO+qBFQA8 zG_5Q$CB;-iMol9G!=#i%%ETDwqRyOi_U=I^yw_Mhv|zoh{o`YOYp+EZW7v$~Hif#G zVBJO^W|q`u5{_@9l*s_V^JJpyhQ;_-;Eb}`SV1SeDnFhg$L#RO^o)Xw746#>*ZACu z^wK(`j_{pljwWmg@{{nea}A{5lOrNC-auem2zHxN+kGPo1vU_fx7y|%CRZQAfDqeTo%w>=A4YGKpIL{>a4o#xDYiLGM zltX=$1%uuiswr^Js$kmEKCh`by`(N%&=woOZ4@LEyO;r;a4bP7gy%_h+}_@yKBGWpZH^7^48AV2py}_&K-2B=);jq?gu& z^91er2jdKapvU`>X{5wQisqy!hyn*u;2{beBs~vV;Ne!ObpQ1j)&-jis{=$?>d486 z4%il8AXN=km(A`l{8C8i619v{5MDR8GbUA{R9PJybD>ELmh`R0VE?e#@KF9* zm0d`aQ5eVn&%1Y<`>6cfatxQTx>55&GAk%-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ZN=@+F#D*xduQ1-~hy*H6d0?iCOS(3D;aaMJ{tC00000NkvXXu0mjf@nMZ3 literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/image-x-generic.png b/sources/htmleditor/images/image-x-generic.png new file mode 100644 index 0000000000000000000000000000000000000000..10f46719da836d4c5b4fbf39d247a7b510290073 GIT binary patch literal 900 zcmV-~1AF|5P)l3YA1 zcv*r6gX9!Uh#>2Abwwj?7GsPi>YB`iJ!CUGe|x*Co`>maXEJD%Yi{_f~gJi>3G9@kg}P)Q>?)e3Fnm4dnN|5VOWW3#MapL3|hBvbJo>r$ztJN)v7ln>;n1Kkt*3aX- zaQ@^uJc`*$X;g}$lBEa{aL$oAhqXdzCfGGIF}f1(=(TUrYIiVEf~G@ddL9${aj*y& z6Bohpow~v9d2E)_>umGXWBZ6E%1o6t^&7QODYVwiR%icHr`g)tqEw1`>BZ-mnTj#S zuy)}BS_g*;@Uu_u<@-yQ@7xX z5x)Ftg=^O~s9nGQ;o^~_hXF$G{qfVEo_^B58LjAmeNGOWRuM~ zGvCa7GiQvd;_dDm1pp5KT-QbMaS29MaejWLzTbt}-q}(B$Y!(OO}E?8O05h4aN6w- z<{#t%AoTJ5uA&Db!hWL`G7~ZO8&v>6e!dWUlq-9L1c>No6fp^-s_OgQq-Dqr0L%>E zw*WLe41xee1ZD;^hljpz!ORe0FcZ9TWsipi0)SMo%TQHR>mT9-E<;41st^%~NT^rR zyHYEIh(JW}eINCMDmtAmtPRp>G@DI`FhoK&BI>aV9LK@elh1J)*4ikfszOzIpMoe< z+U&jGJ+ao#;TpVp`Pz8a+PN1Sn4j}&vIRt7V}T8sKY z1=dF@M?IENkEl1~n3%XZdNRf%OMYq1#v<--w)NEwRO=t2e`Zcp>ce%t@re6` zt1IhJ?GM^&v_Al#R9uFt!WbtNXn;6bUcC4uad!ERhx!Z<6mIH#~rWm z+1b0^%$=F(vtMVqcBhjItj!Toj#(x}cv3`fsmhcpGR7F+7}Ihbr{y@#AJ=tTUdC%@ nvzhkP8> literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/list-add.png b/sources/htmleditor/images/list-add.png new file mode 100644 index 0000000000000000000000000000000000000000..306d3d89291bc35b7515b84a7eb1ff06b1f5329a GIT binary patch literal 386 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fY)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHisK6gRuhm*3iZ7#JA&JzX3_EKa|jYUs`EDAKau+CLy? zi@+M4HE-T~2{!%fF%eU2Rrtr`$+ht#Kg;butkJqUIYqsDTetSMc0GD4&0VZ$$iDj^ zcSK4;qIlYK+p@Op8xHIdY@M(vte#=X;bglVS!w&M3lo?#x8GfGInN+$f!M>DAMIOA znaw{+m};&Pd|uwG={#9$v7SHQPorKX;p2w+@~lEJGV%d4COG`+yc+pl?Q0p&hhHx% zs_NXCj1!sC4@ru!o$EZ*BKam~ZJRCYgz~EG!LoDAzMqtj-?6)X#if&b4~0HFA64r* zdCrP$A#2v_CeL!e)0TEsbx%m%HuLZsx9@VyGwpQ0G4+|u-1z09ZZGvO>q9>CFZQ5?)tP;KpJ*&bQ%kKV6pXhPsZ)QwBze<6)o`Lu?1IrnmCtIy` q#6K4lsK|Z0yY!dH&rr{xgWTashPVA$C(8gG#o+1c=d#Wzp$Pz5QChkH literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/numbered-list.png b/sources/htmleditor/images/numbered-list.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f400129ae2f284e091ad1bbadcef324d64bc31 GIT binary patch literal 739 zcmV<90v!E`P)Px#24YJ`L;#BbjR1%>`?);;00N6iL_t(I%dJ&iPZL2DJ+s}dSRwd`ukvsF140Z~ zZECHxl#mb;-!TZmAo3Y(2#HbOP5enb$b-SO+nw3D_xiA%-7fur7*8_UbaUo@oO|w8 zi3r|rzY_pZB7!jNN)$!#0U!)RXdOXqZfytv6pO|0DvEj%MH;8=WB6g%gVqt!09r?a zKCHDk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 100644 index 0000000000000000000000000000000000000000..a6902947d9c3f56ed6740146a95342dba8afaf3c GIT binary patch literal 1185 zcmV;S1YY}zP)0&R?3PP)`;0v14U}A{z(g?=B=nJtz!UK)r zr7;CfH1UD(MnIox3`l(Ojl{%?iPc0Bqz$z##oFy&%kJ!DW_D)ha*hum(Nt~^e93t_ z=lt@0=l}n{LpbMn5<&5V;)#L9`)%wVxeyl!78zqrYqFuV>T_(ndTzM**kB5NWT3B2 z8F}Mb5CZ%o1>?Y1muHpBzb+mD@X7t|lm8QM@YIi@ozE3MJ31IG>Mm~O4J_x%JP~gq z(RDI5HwWKe4qEoZ>(ptLtB&0a!VwHrGkl6wv6AdFOhVes( zVOh^+haO8jS)gODz1XcT<_*{`!~9Y~2k`C9R6%z=hFdukiH$K;q;%|&!Fvu*^eGbU z+SL)me7c5G#e{CuU8xdy*VHYyQmdn4IG~aOaKCHM;fcOS0t=L!c=e^Hm2BBY)%0*{ zDQEefduHm=Axpt!IE^=iXsg=AB&c3^P?)@U! zcT#K#Mh^6EZ*8>42s&c~Z83^iEFyRfdhEV-8yq|(>TQX_@%LVirZpE?&Bl${d9zq7 zsdtZ}yCZ?O_V=Lf_^=ut)~hn6rZf2E+FUiVoQ+RTj(ckwq_jCU)V`r903srz)u0AM zymMfWsz?H4NkFbxh3~tlI}BHT&%iKk?AV%sBuP+|kW$(lI|$(78n7skvEFAo!t)se zj>};+926=I_>80Bc_5C3{rw3n7Yr0M3y#Z>UNs;GL}X8a}fXtq1gNUc5ou#&vX&_%rdy|`N2S^5RXTp1QZZLw(cB0-FM@{ z=(T&|iBvd|Y)vZpasv&IA-$5ae8x}BTs%(fs-U!PY8h=$ZZI-D1_m{gXC0Om4b5di)Mn3VgF;d;VA00000NkvXXu0mjf%lIkt literal 0 HcmV?d00001 diff --git a/sources/htmleditor/images/text_color.png b/sources/htmleditor/images/text_color.png new file mode 100644 index 0000000000000000000000000000000000000000..496e87992472f1e762f784418c3cbfa56779c24b GIT binary patch literal 889 zcmV-<1BU#GP)?jHaE0|rS% zK~y-)?Um1K6KNR7zt2q4naQ*rYNK7yY_koA!!}Gq+ zkC&JkM74Pr!=VNahjm^o~*<RS( zFr2Ei+d*r48?AB~impR4kIavbjvWfD5@j!5x}*!&MNq9G@47-V-@1{@3CVoR+1U}? zZiB-RKN*GwAp2GDLMD@x%;Q5>t|&Xto*}4K@y7Rwi0%LY5#4cxAlYaj3IZJ0G?jtz zg-j;-MQ|8J)4!!s)Y{%gvs6N%P>=u~?e=TueDuciqzpebgB6c+7)8?uw%hN+!?BcM zY)(#19TSBDn#CfP^LhW@M#KC(=m%Z*Pxtki0W)erfLyIsc_+lsU$0+>T?2AL(#UfZrFf-aw1j&pDKp^Fw-MK+u-uLIaz%#Zz)~BlJxMji5=TY@M zJlWa`zclgy!i;6b3{`~{k0WAE&)D|Z&DGWCd*C=x*6#1uo23$>AizqkCL-Ya&DGU~ zgQzpMea#i(&vb9E(aBmbHk(-hlY8KRIkQwQt4rnb?)D0vRx0<1Xb6DXQR*-mfc#}( z;NgYA!9PmPrm;H$F-18`M8wS8wSI*|Rkzb$#6Mx7J<8Hm1rO}p|DLcVoVq1l@X P00000NkvXXu0mjfc%G*> literal 0 HcmV?d00001 diff --git a/sources/htmleditor/inserthtmldialog.ui b/sources/htmleditor/inserthtmldialog.ui new file mode 100644 index 000000000..9f7cec19f --- /dev/null +++ b/sources/htmleditor/inserthtmldialog.ui @@ -0,0 +1,41 @@ + + + Dialog + + + + 0 + 0 + 426 + 288 + + + + Insert HTML + + + + + + HTML Code: + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + diff --git a/sources/htmleditor/qtlogo.png b/sources/htmleditor/qtlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..1e7ed4cf21300f6695a894db7a6c2376dd65c288 GIT binary patch literal 2205 zcmb_d`9IT-A780f%21!m(VXST2e~C@4J}t;jyZ}f=h$qHCRh6;zE-}5=Dsz(8OgQL zNHq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8_RBMc?aZas?ev%y zQae-^X{lWZL$6o^L0nBQj|tkNqL?1{;MzCvuaLs_y~ zmZfu9vLPBK6`>$zDTOc?OsUxAlz$l_2mCzK`{aJTA6AC#^xj~cJ$NQ4SVmB8}c;;1S(ONB4h+Vv1<2q{$+iUe$x2 zC=s3!S<*L5<;jO0n#0F+Awhjlz4g8vu3R7PxA>wX92Z~`OI%&gEphn-s(C$bX_crV zws;bbK5y%K%46$0h77)aghBOSpdz!Ro;R&nTn8?|Y#RX7bAAbQP%T)=I$Y?am%=ud`<*BY^m)tRV8e$;1HYIm{-WaNl zT?Xu5#6c;Wt~OH(;Xm@rc%tz;f|$;f(Q}g3tngK8{ec@oRc~)PJ%ru9N`yEVm}iIC z3Kd!f8(&lExA%1Ch?9Xuxn&M5b5jRb_sl$ODJ`VpDBL(=&CdYlgI64~5MoYrf=&R) zY49K)M6Y;-;2gRO7ke!8+Mer!pg!ug#Lp}9%w zhEX`vDC%gII=6AbR|ZvUnpkJ;@vUkoTCI6Zaiz5p9&)^SR8iv-yR1{1;l7>nv47JQ z90rkf?O_Htnl7E)wl2iCq}HsJaL-45ZfeCbmkCkU0|oS`6S46t-sZ|H@u5>I;`ph> z-+V^XnC3j2Bar5r#6624WD8Cu)X;Zll|kyW@mK-gJx9krdA}b)a7%kw&DA>({|g8V Bgth editText(); + } +} + /** Affiche les projets dans des fenetres. */ diff --git a/sources/qetdiagrameditor.h b/sources/qetdiagrameditor.h index ababac6b7..8ac97bb26 100644 --- a/sources/qetdiagrameditor.h +++ b/sources/qetdiagrameditor.h @@ -123,6 +123,7 @@ class QETDiagramEditor : public QETMainWindow { void slot_editConductor(); void slot_resetConductors(); void slot_addText(); + void slot_editText(); void setWindowedMode(); void setTabbedMode(); void readSettings(); diff --git a/sources/ui/ui_htmleditor.h b/sources/ui/ui_htmleditor.h new file mode 100644 index 000000000..bef604fe7 --- /dev/null +++ b/sources/ui/ui_htmleditor.h @@ -0,0 +1,509 @@ +/******************************************************************************** +** Form generated from reading UI file 'htmleditor.ui' +** +** Created: Mon 1. Apr 15:44:25 2013 +** by: Qt User Interface Compiler version 4.8.4 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_HTMLEDITOR_H +#define UI_HTMLEDITOR_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_MainWindow +{ +public: + QAction *actionFileNew; + QAction *actionFileOpen; + QAction *actionFileSave; + QAction *actionFileSaveAs; + QAction *actionEditUndo; + QAction *actionEditRedo; + QAction *actionEditCut; + QAction *actionEditCopy; + QAction *actionEditPaste; + QAction *actionEditSelectAll; + QAction *actionFormatBold; + QAction *actionFormatItalic; + QAction *actionFormatUnderline; + QAction *actionFormatStrikethrough; + QAction *actionFormatAlignLeft; + QAction *actionFormatAlignCenter; + QAction *actionFormatAlignRight; + QAction *actionFormatAlignJustify; + QAction *actionFormatIncreaseIndent; + QAction *actionFormatDecreaseIndent; + QAction *actionFormatBulletedList; + QAction *actionFormatNumberedList; + QAction *actionInsertImage; + QAction *actionCreateLink; + QAction *actionZoomOut; + QAction *actionZoomIn; + QAction *actionExit; + QAction *actionStyleParagraph; + QAction *actionStyleHeading1; + QAction *actionStyleHeading2; + QAction *actionStyleHeading3; + QAction *actionStyleHeading4; + QAction *actionStyleHeading5; + QAction *actionStyleHeading6; + QAction *actionStylePreformatted; + QAction *actionStyleAddress; + QAction *actionFormatFontName; + QAction *actionFormatTextColor; + QAction *actionFormatBackgroundColor; + QAction *actionFormatFontSize; + QAction *actionInsertHtml; + QWidget *centralwidget; + QVBoxLayout *verticalLayout; + QTabWidget *tabWidget; + QWidget *tab; + QVBoxLayout *verticalLayout_2; + QWebView *webView; + QWidget *tab_2; + QVBoxLayout *verticalLayout_3; + QPlainTextEdit *plainTextEdit; + QMenuBar *menubar; + QMenu *menu_File; + QMenu *menu_Edit; + QMenu *menuF_ormat; + QMenu *menuSt_yle; + QMenu *menu_Align; + QToolBar *standardToolBar; + QToolBar *formatToolBar; + + void setupUi(QMainWindow *MainWindow) + { + if (MainWindow->objectName().isEmpty()) + MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->resize(659, 398); + actionFileNew = new QAction(MainWindow); + actionFileNew->setObjectName(QString::fromUtf8("actionFileNew")); + QIcon icon; + icon.addFile(QString::fromUtf8(":/images/document-new.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFileNew->setIcon(icon); + actionFileOpen = new QAction(MainWindow); + actionFileOpen->setObjectName(QString::fromUtf8("actionFileOpen")); + QIcon icon1; + icon1.addFile(QString::fromUtf8(":/images/document-open.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFileOpen->setIcon(icon1); + actionFileSave = new QAction(MainWindow); + actionFileSave->setObjectName(QString::fromUtf8("actionFileSave")); + QIcon icon2; + icon2.addFile(QString::fromUtf8(":/images/document-save.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFileSave->setIcon(icon2); + actionFileSaveAs = new QAction(MainWindow); + actionFileSaveAs->setObjectName(QString::fromUtf8("actionFileSaveAs")); + actionEditUndo = new QAction(MainWindow); + actionEditUndo->setObjectName(QString::fromUtf8("actionEditUndo")); + QIcon icon3; + icon3.addFile(QString::fromUtf8(":/images/edit-undo.png"), QSize(), QIcon::Normal, QIcon::Off); + actionEditUndo->setIcon(icon3); + actionEditRedo = new QAction(MainWindow); + actionEditRedo->setObjectName(QString::fromUtf8("actionEditRedo")); + QIcon icon4; + icon4.addFile(QString::fromUtf8(":/images/edit-redo.png"), QSize(), QIcon::Normal, QIcon::Off); + actionEditRedo->setIcon(icon4); + actionEditCut = new QAction(MainWindow); + actionEditCut->setObjectName(QString::fromUtf8("actionEditCut")); + QIcon icon5; + icon5.addFile(QString::fromUtf8(":/images/edit-cut.png"), QSize(), QIcon::Normal, QIcon::Off); + actionEditCut->setIcon(icon5); + actionEditCopy = new QAction(MainWindow); + actionEditCopy->setObjectName(QString::fromUtf8("actionEditCopy")); + QIcon icon6; + icon6.addFile(QString::fromUtf8(":/images/edit-copy.png"), QSize(), QIcon::Normal, QIcon::Off); + actionEditCopy->setIcon(icon6); + actionEditPaste = new QAction(MainWindow); + actionEditPaste->setObjectName(QString::fromUtf8("actionEditPaste")); + QIcon icon7; + icon7.addFile(QString::fromUtf8(":/images/edit-paste.png"), QSize(), QIcon::Normal, QIcon::Off); + actionEditPaste->setIcon(icon7); + actionEditSelectAll = new QAction(MainWindow); + actionEditSelectAll->setObjectName(QString::fromUtf8("actionEditSelectAll")); + QIcon icon8; + icon8.addFile(QString::fromUtf8(":/images/edit-select-all.png"), QSize(), QIcon::Normal, QIcon::Off); + actionEditSelectAll->setIcon(icon8); + actionFormatBold = new QAction(MainWindow); + actionFormatBold->setObjectName(QString::fromUtf8("actionFormatBold")); + actionFormatBold->setCheckable(true); + QIcon icon9; + icon9.addFile(QString::fromUtf8(":/images/format-text-bold.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatBold->setIcon(icon9); + actionFormatItalic = new QAction(MainWindow); + actionFormatItalic->setObjectName(QString::fromUtf8("actionFormatItalic")); + actionFormatItalic->setCheckable(true); + QIcon icon10; + icon10.addFile(QString::fromUtf8(":/images/format-text-italic.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatItalic->setIcon(icon10); + actionFormatUnderline = new QAction(MainWindow); + actionFormatUnderline->setObjectName(QString::fromUtf8("actionFormatUnderline")); + actionFormatUnderline->setCheckable(true); + QIcon icon11; + icon11.addFile(QString::fromUtf8(":/images/format-text-underline.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatUnderline->setIcon(icon11); + actionFormatStrikethrough = new QAction(MainWindow); + actionFormatStrikethrough->setObjectName(QString::fromUtf8("actionFormatStrikethrough")); + actionFormatStrikethrough->setCheckable(true); + QIcon icon12; + icon12.addFile(QString::fromUtf8(":/images/format-text-strikethrough.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatStrikethrough->setIcon(icon12); + actionFormatAlignLeft = new QAction(MainWindow); + actionFormatAlignLeft->setObjectName(QString::fromUtf8("actionFormatAlignLeft")); + QIcon icon13; + icon13.addFile(QString::fromUtf8(":/images/format-justify-left.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatAlignLeft->setIcon(icon13); + actionFormatAlignCenter = new QAction(MainWindow); + actionFormatAlignCenter->setObjectName(QString::fromUtf8("actionFormatAlignCenter")); + QIcon icon14; + icon14.addFile(QString::fromUtf8(":/images/format-justify-center.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatAlignCenter->setIcon(icon14); + actionFormatAlignRight = new QAction(MainWindow); + actionFormatAlignRight->setObjectName(QString::fromUtf8("actionFormatAlignRight")); + QIcon icon15; + icon15.addFile(QString::fromUtf8(":/images/format-justify-right.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatAlignRight->setIcon(icon15); + actionFormatAlignJustify = new QAction(MainWindow); + actionFormatAlignJustify->setObjectName(QString::fromUtf8("actionFormatAlignJustify")); + QIcon icon16; + icon16.addFile(QString::fromUtf8(":/images/format-justify-fill.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatAlignJustify->setIcon(icon16); + actionFormatIncreaseIndent = new QAction(MainWindow); + actionFormatIncreaseIndent->setObjectName(QString::fromUtf8("actionFormatIncreaseIndent")); + QIcon icon17; + icon17.addFile(QString::fromUtf8(":/images/format-indent-more.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatIncreaseIndent->setIcon(icon17); + actionFormatDecreaseIndent = new QAction(MainWindow); + actionFormatDecreaseIndent->setObjectName(QString::fromUtf8("actionFormatDecreaseIndent")); + QIcon icon18; + icon18.addFile(QString::fromUtf8(":/images/format-indent-less.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatDecreaseIndent->setIcon(icon18); + actionFormatBulletedList = new QAction(MainWindow); + actionFormatBulletedList->setObjectName(QString::fromUtf8("actionFormatBulletedList")); + actionFormatBulletedList->setCheckable(true); + QIcon icon19; + icon19.addFile(QString::fromUtf8(":/images/bulleted-list.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatBulletedList->setIcon(icon19); + actionFormatNumberedList = new QAction(MainWindow); + actionFormatNumberedList->setObjectName(QString::fromUtf8("actionFormatNumberedList")); + actionFormatNumberedList->setCheckable(true); + QIcon icon20; + icon20.addFile(QString::fromUtf8(":/images/numbered-list.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatNumberedList->setIcon(icon20); + actionInsertImage = new QAction(MainWindow); + actionInsertImage->setObjectName(QString::fromUtf8("actionInsertImage")); + QIcon icon21; + icon21.addFile(QString::fromUtf8(":/images/image-x-generic.png"), QSize(), QIcon::Normal, QIcon::Off); + actionInsertImage->setIcon(icon21); + actionInsertImage->setVisible(false); + actionCreateLink = new QAction(MainWindow); + actionCreateLink->setObjectName(QString::fromUtf8("actionCreateLink")); + QIcon icon22; + icon22.addFile(QString::fromUtf8(":/images/text-html.png"), QSize(), QIcon::Normal, QIcon::Off); + actionCreateLink->setIcon(icon22); + actionZoomOut = new QAction(MainWindow); + actionZoomOut->setObjectName(QString::fromUtf8("actionZoomOut")); + QIcon icon23; + icon23.addFile(QString::fromUtf8(":/images/list-remove.png"), QSize(), QIcon::Normal, QIcon::Off); + actionZoomOut->setIcon(icon23); + actionZoomIn = new QAction(MainWindow); + actionZoomIn->setObjectName(QString::fromUtf8("actionZoomIn")); + QIcon icon24; + icon24.addFile(QString::fromUtf8(":/images/list-add.png"), QSize(), QIcon::Normal, QIcon::Off); + actionZoomIn->setIcon(icon24); + actionExit = new QAction(MainWindow); + actionExit->setObjectName(QString::fromUtf8("actionExit")); + actionStyleParagraph = new QAction(MainWindow); + actionStyleParagraph->setObjectName(QString::fromUtf8("actionStyleParagraph")); + actionStyleHeading1 = new QAction(MainWindow); + actionStyleHeading1->setObjectName(QString::fromUtf8("actionStyleHeading1")); + actionStyleHeading2 = new QAction(MainWindow); + actionStyleHeading2->setObjectName(QString::fromUtf8("actionStyleHeading2")); + actionStyleHeading3 = new QAction(MainWindow); + actionStyleHeading3->setObjectName(QString::fromUtf8("actionStyleHeading3")); + actionStyleHeading4 = new QAction(MainWindow); + actionStyleHeading4->setObjectName(QString::fromUtf8("actionStyleHeading4")); + actionStyleHeading5 = new QAction(MainWindow); + actionStyleHeading5->setObjectName(QString::fromUtf8("actionStyleHeading5")); + actionStyleHeading6 = new QAction(MainWindow); + actionStyleHeading6->setObjectName(QString::fromUtf8("actionStyleHeading6")); + actionStylePreformatted = new QAction(MainWindow); + actionStylePreformatted->setObjectName(QString::fromUtf8("actionStylePreformatted")); + actionStyleAddress = new QAction(MainWindow); + actionStyleAddress->setObjectName(QString::fromUtf8("actionStyleAddress")); + actionFormatFontName = new QAction(MainWindow); + actionFormatFontName->setObjectName(QString::fromUtf8("actionFormatFontName")); + actionFormatTextColor = new QAction(MainWindow); + actionFormatTextColor->setObjectName(QString::fromUtf8("actionFormatTextColor")); + QIcon icon25; + icon25.addFile(QString::fromUtf8(":/images/text_color.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatTextColor->setIcon(icon25); + actionFormatBackgroundColor = new QAction(MainWindow); + actionFormatBackgroundColor->setObjectName(QString::fromUtf8("actionFormatBackgroundColor")); + actionFormatFontSize = new QAction(MainWindow); + actionFormatFontSize->setObjectName(QString::fromUtf8("actionFormatFontSize")); + QIcon icon26; + icon26.addFile(QString::fromUtf8(":/images/text.png"), QSize(), QIcon::Normal, QIcon::Off); + actionFormatFontSize->setIcon(icon26); + actionInsertHtml = new QAction(MainWindow); + actionInsertHtml->setObjectName(QString::fromUtf8("actionInsertHtml")); + QIcon icon27; + icon27.addFile(QString::fromUtf8(":/images/insert-html.png"), QSize(), QIcon::Normal, QIcon::Off); + actionInsertHtml->setIcon(icon27); + centralwidget = new QWidget(MainWindow); + centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + verticalLayout = new QVBoxLayout(centralwidget); + verticalLayout->setContentsMargins(0, 0, 0, 0); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + tabWidget = new QTabWidget(centralwidget); + tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + tabWidget->setTabPosition(QTabWidget::South); + tabWidget->setTabShape(QTabWidget::Rounded); + tabWidget->setDocumentMode(true); + tab = new QWidget(); + tab->setObjectName(QString::fromUtf8("tab")); + verticalLayout_2 = new QVBoxLayout(tab); + verticalLayout_2->setContentsMargins(0, 0, 0, 0); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + webView = new QWebView(tab); + webView->setObjectName(QString::fromUtf8("webView")); + webView->setUrl(QUrl(QString::fromUtf8("about:blank"))); + + verticalLayout_2->addWidget(webView); + + tabWidget->addTab(tab, QString()); + tab_2 = new QWidget(); + tab_2->setObjectName(QString::fromUtf8("tab_2")); + verticalLayout_3 = new QVBoxLayout(tab_2); + verticalLayout_3->setContentsMargins(0, 0, 0, 0); + verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + plainTextEdit = new QPlainTextEdit(tab_2); + plainTextEdit->setObjectName(QString::fromUtf8("plainTextEdit")); + plainTextEdit->setFrameShape(QFrame::NoFrame); + plainTextEdit->setReadOnly(true); + + verticalLayout_3->addWidget(plainTextEdit); + + tabWidget->addTab(tab_2, QString()); + + verticalLayout->addWidget(tabWidget); + + MainWindow->setCentralWidget(centralwidget); + menubar = new QMenuBar(MainWindow); + menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setGeometry(QRect(0, 0, 659, 31)); + menu_File = new QMenu(menubar); + menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_Edit = new QMenu(menubar); + menu_Edit->setObjectName(QString::fromUtf8("menu_Edit")); + menuF_ormat = new QMenu(menubar); + menuF_ormat->setObjectName(QString::fromUtf8("menuF_ormat")); + menuSt_yle = new QMenu(menuF_ormat); + menuSt_yle->setObjectName(QString::fromUtf8("menuSt_yle")); + menu_Align = new QMenu(menuF_ormat); + menu_Align->setObjectName(QString::fromUtf8("menu_Align")); + MainWindow->setMenuBar(menubar); + standardToolBar = new QToolBar(MainWindow); + standardToolBar->setObjectName(QString::fromUtf8("standardToolBar")); + standardToolBar->setEnabled(false); + standardToolBar->setIconSize(QSize(24, 24)); + MainWindow->addToolBar(Qt::TopToolBarArea, standardToolBar); + formatToolBar = new QToolBar(MainWindow); + formatToolBar->setObjectName(QString::fromUtf8("formatToolBar")); + formatToolBar->setIconSize(QSize(24, 24)); + MainWindow->addToolBar(Qt::TopToolBarArea, formatToolBar); + MainWindow->insertToolBarBreak(formatToolBar); + + menubar->addAction(menu_File->menuAction()); + menubar->addAction(menu_Edit->menuAction()); + menubar->addAction(menuF_ormat->menuAction()); + menu_File->addAction(actionFileNew); + menu_File->addAction(actionFileOpen); + menu_File->addAction(actionFileSave); + menu_File->addAction(actionFileSaveAs); + menu_File->addSeparator(); + menu_File->addAction(actionExit); + menu_Edit->addAction(actionEditUndo); + menu_Edit->addAction(actionEditRedo); + menu_Edit->addSeparator(); + menu_Edit->addAction(actionEditCut); + menu_Edit->addAction(actionEditCopy); + menu_Edit->addAction(actionEditPaste); + menu_Edit->addSeparator(); + menu_Edit->addAction(actionEditSelectAll); + menu_Edit->addSeparator(); + menu_Edit->addAction(actionInsertImage); + menu_Edit->addAction(actionCreateLink); + menu_Edit->addAction(actionInsertHtml); + menuF_ormat->addAction(menuSt_yle->menuAction()); + menuF_ormat->addAction(menu_Align->menuAction()); + menuF_ormat->addSeparator(); + menuF_ormat->addAction(actionFormatBold); + menuF_ormat->addAction(actionFormatItalic); + menuF_ormat->addAction(actionFormatUnderline); + menuF_ormat->addAction(actionFormatStrikethrough); + menuF_ormat->addSeparator(); + menuF_ormat->addAction(actionFormatIncreaseIndent); + menuF_ormat->addAction(actionFormatDecreaseIndent); + menuF_ormat->addSeparator(); + menuF_ormat->addAction(actionFormatNumberedList); + menuF_ormat->addAction(actionFormatBulletedList); + menuF_ormat->addSeparator(); + menuF_ormat->addAction(actionFormatFontName); + menuF_ormat->addAction(actionFormatFontSize); + menuF_ormat->addSeparator(); + menuF_ormat->addAction(actionFormatTextColor); + menuF_ormat->addAction(actionFormatBackgroundColor); + menuSt_yle->addAction(actionStyleParagraph); + menuSt_yle->addAction(actionStyleHeading1); + menuSt_yle->addAction(actionStyleHeading2); + menuSt_yle->addAction(actionStyleHeading3); + menuSt_yle->addAction(actionStyleHeading4); + menuSt_yle->addAction(actionStyleHeading5); + menuSt_yle->addAction(actionStyleHeading6); + menuSt_yle->addAction(actionStylePreformatted); + menuSt_yle->addAction(actionStyleAddress); + menu_Align->addAction(actionFormatAlignLeft); + menu_Align->addAction(actionFormatAlignCenter); + menu_Align->addAction(actionFormatAlignRight); + menu_Align->addAction(actionFormatAlignJustify); + standardToolBar->addAction(actionFileNew); + standardToolBar->addAction(actionFileOpen); + standardToolBar->addAction(actionFileSave); + standardToolBar->addSeparator(); + standardToolBar->addAction(actionEditUndo); + standardToolBar->addAction(actionEditRedo); + standardToolBar->addSeparator(); + standardToolBar->addAction(actionEditCut); + standardToolBar->addAction(actionEditCopy); + standardToolBar->addAction(actionEditPaste); + standardToolBar->addSeparator(); + standardToolBar->addAction(actionZoomOut); + standardToolBar->addAction(actionZoomIn); + formatToolBar->addAction(actionFormatBold); + formatToolBar->addAction(actionFormatItalic); + formatToolBar->addAction(actionFormatUnderline); + formatToolBar->addAction(actionFormatStrikethrough); + formatToolBar->addAction(actionFormatFontSize); + formatToolBar->addAction(actionFormatTextColor); + formatToolBar->addSeparator(); + formatToolBar->addAction(actionFormatAlignLeft); + formatToolBar->addAction(actionFormatAlignCenter); + formatToolBar->addAction(actionFormatAlignRight); + formatToolBar->addAction(actionFormatAlignJustify); + formatToolBar->addSeparator(); + formatToolBar->addAction(actionFormatDecreaseIndent); + formatToolBar->addAction(actionFormatIncreaseIndent); + formatToolBar->addSeparator(); + formatToolBar->addAction(actionFormatNumberedList); + formatToolBar->addAction(actionFormatBulletedList); + formatToolBar->addSeparator(); + formatToolBar->addAction(actionInsertImage); + formatToolBar->addAction(actionCreateLink); + formatToolBar->addAction(actionInsertHtml); + + retranslateUi(MainWindow); + + tabWidget->setCurrentIndex(0); + + + QMetaObject::connectSlotsByName(MainWindow); + } // setupUi + + void retranslateUi(QMainWindow *MainWindow) + { + MainWindow->setWindowTitle(QApplication::translate("MainWindow", "HTML Editor", 0, QApplication::UnicodeUTF8)); + actionFileNew->setText(QApplication::translate("MainWindow", "&New", 0, QApplication::UnicodeUTF8)); + actionFileNew->setShortcut(QApplication::translate("MainWindow", "Ctrl+N", 0, QApplication::UnicodeUTF8)); + actionFileOpen->setText(QApplication::translate("MainWindow", "&Open...", 0, QApplication::UnicodeUTF8)); + actionFileOpen->setShortcut(QApplication::translate("MainWindow", "Ctrl+O", 0, QApplication::UnicodeUTF8)); + actionFileSave->setText(QApplication::translate("MainWindow", "&Save", 0, QApplication::UnicodeUTF8)); + actionFileSave->setShortcut(QApplication::translate("MainWindow", "Ctrl+S", 0, QApplication::UnicodeUTF8)); + actionFileSaveAs->setText(QApplication::translate("MainWindow", "Save &As...", 0, QApplication::UnicodeUTF8)); + actionEditUndo->setText(QApplication::translate("MainWindow", "&Undo", 0, QApplication::UnicodeUTF8)); + actionEditUndo->setShortcut(QApplication::translate("MainWindow", "Ctrl+Z", 0, QApplication::UnicodeUTF8)); + actionEditRedo->setText(QApplication::translate("MainWindow", "&Redo", 0, QApplication::UnicodeUTF8)); + actionEditRedo->setShortcut(QApplication::translate("MainWindow", "Ctrl+Y", 0, QApplication::UnicodeUTF8)); + actionEditCut->setText(QApplication::translate("MainWindow", "Cu&t", 0, QApplication::UnicodeUTF8)); + actionEditCut->setShortcut(QApplication::translate("MainWindow", "Ctrl+X", 0, QApplication::UnicodeUTF8)); + actionEditCopy->setText(QApplication::translate("MainWindow", "&Copy", 0, QApplication::UnicodeUTF8)); + actionEditCopy->setShortcut(QApplication::translate("MainWindow", "Ctrl+C", 0, QApplication::UnicodeUTF8)); + actionEditPaste->setText(QApplication::translate("MainWindow", "&Paste", 0, QApplication::UnicodeUTF8)); + actionEditPaste->setShortcut(QApplication::translate("MainWindow", "Ctrl+V", 0, QApplication::UnicodeUTF8)); + actionEditSelectAll->setText(QApplication::translate("MainWindow", "Select A&ll", 0, QApplication::UnicodeUTF8)); + actionEditSelectAll->setShortcut(QApplication::translate("MainWindow", "Ctrl+A", 0, QApplication::UnicodeUTF8)); + actionFormatBold->setText(QApplication::translate("MainWindow", "&Bold", 0, QApplication::UnicodeUTF8)); + actionFormatBold->setShortcut(QApplication::translate("MainWindow", "Ctrl+B", 0, QApplication::UnicodeUTF8)); + actionFormatItalic->setText(QApplication::translate("MainWindow", "&Italic", 0, QApplication::UnicodeUTF8)); + actionFormatItalic->setShortcut(QApplication::translate("MainWindow", "Ctrl+I", 0, QApplication::UnicodeUTF8)); + actionFormatUnderline->setText(QApplication::translate("MainWindow", "&Underline", 0, QApplication::UnicodeUTF8)); + actionFormatUnderline->setShortcut(QApplication::translate("MainWindow", "Ctrl+U", 0, QApplication::UnicodeUTF8)); + actionFormatStrikethrough->setText(QApplication::translate("MainWindow", "&Strikethrough", 0, QApplication::UnicodeUTF8)); + actionFormatAlignLeft->setText(QApplication::translate("MainWindow", "Align &Left", 0, QApplication::UnicodeUTF8)); + actionFormatAlignCenter->setText(QApplication::translate("MainWindow", "Align &Center", 0, QApplication::UnicodeUTF8)); + actionFormatAlignRight->setText(QApplication::translate("MainWindow", "Align &Right", 0, QApplication::UnicodeUTF8)); + actionFormatAlignJustify->setText(QApplication::translate("MainWindow", "Align &Justify", 0, QApplication::UnicodeUTF8)); + actionFormatIncreaseIndent->setText(QApplication::translate("MainWindow", "I&ncrease Indent", 0, QApplication::UnicodeUTF8)); + actionFormatDecreaseIndent->setText(QApplication::translate("MainWindow", "&Decrease Indent", 0, QApplication::UnicodeUTF8)); + actionFormatBulletedList->setText(QApplication::translate("MainWindow", "Bulle&ted List", 0, QApplication::UnicodeUTF8)); + actionFormatNumberedList->setText(QApplication::translate("MainWindow", "&Numbered List", 0, QApplication::UnicodeUTF8)); + actionInsertImage->setText(QApplication::translate("MainWindow", "Insert &Image...", 0, QApplication::UnicodeUTF8)); + actionCreateLink->setText(QApplication::translate("MainWindow", "Create Link...", 0, QApplication::UnicodeUTF8)); + actionZoomOut->setText(QApplication::translate("MainWindow", "Zoom Out", 0, QApplication::UnicodeUTF8)); + actionZoomIn->setText(QApplication::translate("MainWindow", "Zoom In", 0, QApplication::UnicodeUTF8)); + actionExit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8)); + actionExit->setShortcut(QApplication::translate("MainWindow", "Ctrl+Q", 0, QApplication::UnicodeUTF8)); + actionStyleParagraph->setText(QApplication::translate("MainWindow", "&Paragraph", 0, QApplication::UnicodeUTF8)); + actionStyleHeading1->setText(QApplication::translate("MainWindow", "Heading &1", 0, QApplication::UnicodeUTF8)); + actionStyleHeading2->setText(QApplication::translate("MainWindow", "Heading &2", 0, QApplication::UnicodeUTF8)); + actionStyleHeading3->setText(QApplication::translate("MainWindow", "Heading &3", 0, QApplication::UnicodeUTF8)); + actionStyleHeading4->setText(QApplication::translate("MainWindow", "Heading &4", 0, QApplication::UnicodeUTF8)); + actionStyleHeading5->setText(QApplication::translate("MainWindow", "Heading &5", 0, QApplication::UnicodeUTF8)); + actionStyleHeading6->setText(QApplication::translate("MainWindow", "Heading &6", 0, QApplication::UnicodeUTF8)); + actionStylePreformatted->setText(QApplication::translate("MainWindow", "Pre&formatted", 0, QApplication::UnicodeUTF8)); + actionStyleAddress->setText(QApplication::translate("MainWindow", "&Address", 0, QApplication::UnicodeUTF8)); + actionFormatFontName->setText(QApplication::translate("MainWindow", "&Font Name...", 0, QApplication::UnicodeUTF8)); + actionFormatTextColor->setText(QApplication::translate("MainWindow", "Text &Color...", 0, QApplication::UnicodeUTF8)); + actionFormatBackgroundColor->setText(QApplication::translate("MainWindow", "Bac&kground Color...", 0, QApplication::UnicodeUTF8)); + actionFormatFontSize->setText(QApplication::translate("MainWindow", "Font Si&ze...", 0, QApplication::UnicodeUTF8)); + actionInsertHtml->setText(QApplication::translate("MainWindow", "Insert HTML...", 0, QApplication::UnicodeUTF8)); +#ifndef QT_NO_TOOLTIP + actionInsertHtml->setToolTip(QApplication::translate("MainWindow", "Insert HTML", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_TOOLTIP + tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Tab 1", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Tab 2", 0, QApplication::UnicodeUTF8)); + menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8)); + menu_Edit->setTitle(QApplication::translate("MainWindow", "&Edit", 0, QApplication::UnicodeUTF8)); + menuF_ormat->setTitle(QApplication::translate("MainWindow", "F&ormat", 0, QApplication::UnicodeUTF8)); + menuSt_yle->setTitle(QApplication::translate("MainWindow", "St&yle", 0, QApplication::UnicodeUTF8)); + menu_Align->setTitle(QApplication::translate("MainWindow", "&Align", 0, QApplication::UnicodeUTF8)); + standardToolBar->setWindowTitle(QApplication::translate("MainWindow", "Standard", 0, QApplication::UnicodeUTF8)); + formatToolBar->setWindowTitle(QApplication::translate("MainWindow", "Formatting", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class MainWindow: public Ui_MainWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_HTMLEDITOR_H diff --git a/sources/ui/ui_inserthtmldialog.h b/sources/ui/ui_inserthtmldialog.h new file mode 100644 index 000000000..ddf46043d --- /dev/null +++ b/sources/ui/ui_inserthtmldialog.h @@ -0,0 +1,78 @@ +/******************************************************************************** +** Form generated from reading UI file 'inserthtmldialog.ui' +** +** Created: Sun 31. Mar 20:12:38 2013 +** by: Qt User Interface Compiler version 4.8.4 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_INSERTHTMLDIALOG_H +#define UI_INSERTHTMLDIALOG_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_Dialog +{ +public: + QVBoxLayout *verticalLayout; + QLabel *label; + QPlainTextEdit *plainTextEdit; + QDialogButtonBox *buttonBox; + + void setupUi(QDialog *Dialog) + { + if (Dialog->objectName().isEmpty()) + Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->resize(426, 288); + verticalLayout = new QVBoxLayout(Dialog); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + label = new QLabel(Dialog); + label->setObjectName(QString::fromUtf8("label")); + + verticalLayout->addWidget(label); + + plainTextEdit = new QPlainTextEdit(Dialog); + plainTextEdit->setObjectName(QString::fromUtf8("plainTextEdit")); + + verticalLayout->addWidget(plainTextEdit); + + buttonBox = new QDialogButtonBox(Dialog); + buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setOrientation(Qt::Horizontal); + buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + verticalLayout->addWidget(buttonBox); + + + retranslateUi(Dialog); + + QMetaObject::connectSlotsByName(Dialog); + } // setupUi + + void retranslateUi(QDialog *Dialog) + { + Dialog->setWindowTitle(QApplication::translate("Dialog", "Insert HTML", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("Dialog", "HTML Code:", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class Dialog: public Ui_Dialog {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_INSERTHTMLDIALOG_H