From 3fb9983fa5daef0a4377bfad929747f5b94d4ec4 Mon Sep 17 00:00:00 2001 From: birkeh Date: Sat, 14 Apr 2018 22:13:49 +0200 Subject: [PATCH] . --- cmainwindow.cpp | 328 +++++++++---------------------------------- cmainwindow.h | 10 +- cmainwindow.ui | 99 +++++++------ cstructurewindow.cpp | 22 +++ cstructurewindow.h | 25 ++++ cstructurewindow.ui | 49 +++++++ cwidget.cpp | 18 +++ cwidget.h | 24 ++++ example.html | 79 ----------- images/logo32.png | Bin 1410 -> 0 bytes qtStoryWriter.pro | 14 +- qtstorywriter.qrc | 2 - 12 files changed, 278 insertions(+), 392 deletions(-) create mode 100644 cstructurewindow.cpp create mode 100644 cstructurewindow.h create mode 100644 cstructurewindow.ui create mode 100644 cwidget.cpp create mode 100644 cwidget.h delete mode 100644 example.html delete mode 100644 images/logo32.png diff --git a/cmainwindow.cpp b/cmainwindow.cpp index fe7ad32..b36f8c4 100644 --- a/cmainwindow.cpp +++ b/cmainwindow.cpp @@ -4,289 +4,95 @@ #include "ctextdocument.h" #include "cdocumentreader.h" +#include "cstructurewindow.h" +#include "cwidget.h" + #include #include #include -#include -#include -#include -#include - - -//#define WITH_ZIP - - -cTextDocument* g_lpInputDocument = 0; -cTextDocument* g_lpOutputDocument = 0; - - -QTextBlockFormat createTextBlockFormat(Qt::Alignment alignment, qreal leftMargin, qreal topMargin, qreal rightMargin, qreal bottomMargin, int indent, qreal lineHeight, int lineHeightType, - bool nonBreakableLines, QTextBlockFormat::PageBreakFlags pageBreakPolicy, const QList& tabPositions, qreal textIndent, - QBrush background, QBrush foreground, Qt::LayoutDirection layoutDirection, int objectIndex, int objectType /* property*/) -{ - QTextBlockFormat format; - - format.setAlignment(alignment); - format.setLeftMargin(leftMargin); - format.setTopMargin(topMargin); - format.setRightMargin(rightMargin); - format.setBottomMargin(bottomMargin); - format.setIndent(indent); - format.setLineHeight(lineHeight, lineHeightType); - format.setNonBreakableLines(nonBreakableLines); - format.setPageBreakPolicy(pageBreakPolicy); - format.setTabPositions(tabPositions); - format.setTextIndent(textIndent); - - format.setBackground(background); - format.setForeground(foreground); - format.setLayoutDirection(layoutDirection); - format.setObjectIndex(objectIndex); - format.setObjectType(objectType); - //property - - return(format); -} - -QTextCharFormat createTextCharFormat(bool anchor, const QString& anchorHref, const QStringList& anchorNames, const QFont& font, QTextCharFormat::FontPropertiesInheritanceBehavior behavior, - const QPen& textOutline, const QString& toolTip, const QColor& underlineColor, QTextCharFormat::UnderlineStyle underlineStyle, QTextCharFormat::VerticalAlignment verticalAlignment, - QBrush background, QBrush foreground, Qt::LayoutDirection layoutDirection, int objectIndex, int objectType /* property*/) -{ - QTextCharFormat format; - - format.setAnchor(anchor); - format.setAnchorHref(anchorHref); - format.setAnchorNames(anchorNames); - format.setFont(font, behavior); - format.setTextOutline(textOutline); - format.setToolTip(toolTip); - format.setUnderlineColor(underlineColor); - format.setUnderlineStyle(underlineStyle); - format.setVerticalAlignment(verticalAlignment); - - format.setBackground(background); - format.setForeground(foreground); - format.setLayoutDirection(layoutDirection); - format.setObjectIndex(objectIndex); - format.setObjectType(objectType); - //property - - return(format); -} - -void readWriteTest1() -{ - if(!QFile::exists(":/example.html")) - return; - QFile file(":/example.html"); - - if(!file.open(QFile::ReadOnly)) - return; - - QByteArray data = file.readAll(); - QTextCodec* codec = Qt::codecForHtml(data); - QString str = codec->toUnicode(data); - if(Qt::mightBeRichText(str)) - { - g_lpInputDocument->setHtml(str); - } - else - { - str = QString::fromLocal8Bit(data); - g_lpInputDocument->setPlainText(str); - } - - file.close(); -} - -void readWriteTest2() -{ - QTextCursor cursor(g_lpInputDocument); - - // TEXT BLOCK FORMAT - Qt::Alignment alignment = Qt::AlignCenter; - qreal leftMargin = 0; - qreal topMargin = 0; - qreal rightMargin = 0; - qreal bottomMargin = 0; - int indent = 0; - qreal lineHeight = 1; - int lineHeightType = QTextBlockFormat::SingleHeight; // QTextBlockFormat::SingleHeight 0 This is the default line height: single spacing. - // QTextBlockFormat::ProportionalHeight 1 This sets the spacing proportional to the line (in percentage). For example, set to 200 for double spacing. - // QTextBlockFormat::FixedHeight 2 This sets the line height to a fixed line height (in pixels). - // QTextBlockFormat::MinimumHeight 3 This sets the minimum line height (in pixels). - // QTextBlockFormat::LineDistanceHeight 4 This adds the specified height between lines (in pixels). - bool nonBreakableLines = false; - QTextBlockFormat::PageBreakFlags pageBreakPolicy = QTextFormat::PageBreak_Auto; // QTextFormat::PageBreak_Auto 0 The page break is determined automatically depending on the available space on the current page - // QTextFormat::PageBreak_AlwaysBefore 0x001 The page is always broken before the paragraph/table - // QTextFormat::PageBreak_AlwaysAfter 0x010 A new page is always started after the paragraph/table - const QList tabPositions; - qreal textIndent = 0; - QBrush background = QBrush(QColor("lightGray")); - QBrush foreground = QBrush(QColor("black")); - Qt::LayoutDirection layoutDirection = Qt::LeftToRight; // Qt::LeftToRight 0 Left-to-right layout. - // Qt::RightToLeft 1 Right-to-left layout. - // Qt::LayoutDirectionAuto 2 Automatic layout. - int objectIndex = 0; - int objectType = QTextFormat::NoObject; // QTextFormat::NoObject 0 - // QTextFormat::ImageObject 1 - // QTextFormat::TableObject 2 - // QTextFormat::TableCellObject 3 - // QTextFormat::UserObject 0x1000 The first object that can be used for application-specific purposes. - //property - - - // TEXT CHAR FORMAT - bool anchor = false; - QString anchorHref = ""; - QStringList anchorNames; - QFont font = QFont("Arial"); - QTextCharFormat::FontPropertiesInheritanceBehavior behavior = QTextCharFormat::FontPropertiesAll;// QTextCharFormat::FontPropertiesSpecifiedOnly 0 If a property is not explicitly set, do not change the text format's property value. - // QTextCharFormat::FontPropertiesAll 1 If a property is not explicitly set, override the text format's property with a default value. - QPen textOutline = QPen(QColor("blue")); - QString toolTip = "toolTip"; - QColor underlineColor = QColor("yellow"); - QTextCharFormat::UnderlineStyle underlineStyle = QTextCharFormat::NoUnderline; // QTextCharFormat::NoUnderline 0 Text is draw without any underlining decoration. - // QTextCharFormat::SingleUnderline 1 A line is drawn using Qt::SolidLine. - // QTextCharFormat::DashUnderline 2 Dashes are drawn using Qt::DashLine. - // QTextCharFormat::DotLine 3 Dots are drawn using Qt::DotLine; - // QTextCharFormat::DashDotLine 4 Dashs and dots are drawn using Qt::DashDotLine. - // QTextCharFormat::DashDotDotLine 5 Underlines draw drawn using Qt::DashDotDotLine. - // QTextCharFormat::WaveUnderline 6 The text is underlined using a wave shaped line. - // QTextCharFormat::SpellCheckUnderline 7 The underline is drawn depending on the SpellCheckUnderlineStyle theme hint of QPlatformTheme. By default this is mapped to WaveUnderline, on macOS it is mapped to DotLine. - QTextCharFormat::VerticalAlignment verticalAlignment = QTextCharFormat::AlignNormal; // QTextCharFormat::AlignNormal 0 Adjacent characters are positioned in the standard way for text in the writing system in use. - // QTextCharFormat::AlignSuperScript 1 Characters are placed above the base line for normal text. - // QTextCharFormat::AlignSubScript 2 Characters are placed below the base line for normal text. - // QTextCharFormat::AlignMiddle 3 The center of the object is vertically aligned with the base line. Currently, this is only implemented for inline objects. - // QTextCharFormat::AlignBottom 5 The bottom edge of the object is vertically aligned with the base line. - // QTextCharFormat::AlignTop 4 The top edge of the object is vertically aligned with the base line. - // QTextCharFormat::AlignBaseline 6 The base lines of the characters are aligned. - QBrush background1 = QBrush(QColor("red")); - QBrush foreground1 = QBrush(QColor("green")); - Qt::LayoutDirection layoutDirection1 = Qt::LeftToRight; // Qt::LeftToRight 0 Left-to-right layout. - // Qt::RightToLeft 1 Right-to-left layout. - // Qt::LayoutDirectionAuto 2 Automatic layout. - int objectIndex1 = 0; - int objectType1 = QTextFormat::NoObject; // QTextFormat::NoObject 0 - // QTextFormat::ImageObject 1 - // QTextFormat::TableObject 2 - // QTextFormat::TableCellObject 3 - // QTextFormat::UserObject 0x1000 The first object that can be used for application-specific purposes. - //property - - QTextBlockFormat blockFormat1 = createTextBlockFormat(alignment, leftMargin, topMargin, rightMargin, bottomMargin, indent, lineHeight, lineHeightType, nonBreakableLines, pageBreakPolicy, tabPositions, textIndent, background, foreground, layoutDirection, objectIndex, objectType); - QTextCharFormat charFormat1 = createTextCharFormat(anchor, anchorHref, anchorNames, font, behavior, textOutline, toolTip, underlineColor, underlineStyle, verticalAlignment, background1, foreground1, layoutDirection1, objectIndex1, objectType1); // property); - - cursor.setBlockFormat(blockFormat1); - cursor.setBlockCharFormat(charFormat1); - - cursor.insertText("TestText"); -} - -#include - -void readWriteTest3() -{ - QTextCursor cursor(g_lpInputDocument); - - QTextListFormat* lpFormat = new QTextListFormat; - QString numberSuffix = lpFormat->numberSuffix(); - - lpFormat->setNumberSuffix("."); - numberSuffix = lpFormat->numberSuffix(); - - delete lpFormat; - - QTextList* list1; - QTextList* list2; - QTextList* list3; - QTextBlock textBlock; - - QTextListFormat format1; - QTextListFormat format2; - QTextListFormat format3; - format1.setStyle(QTextListFormat::ListDecimal); - format1.setIndent(1); - format2.setStyle(QTextListFormat::ListLowerAlpha); - format2.setIndent(2); - format3.setStyle(QTextListFormat::ListUpperAlpha); - format3.setIndent(3); - - list1 = cursor.insertList(format1); - textBlock = cursor.block(); cursor.insertText("Introduction"); list1->add(textBlock); - cursor.insertBlock(); textBlock = cursor.block(); cursor.insertText("Tools"); list1->add(textBlock); - - list2 = cursor.insertList(format2); - textBlock = cursor.block(); cursor.insertText("Assistant"); list2->add(textBlock); - cursor.insertBlock(); textBlock = cursor.block(); cursor.insertText("Designer"); list2->add(textBlock); - - list3 = cursor.insertList(format3); - textBlock = cursor.block(); cursor.insertText("Form Editor"); list3->add(textBlock); - cursor.insertBlock(); textBlock = cursor.block(); cursor.insertText("Component Architecture"); list3->add(textBlock); - - cursor.insertBlock(); textBlock = cursor.block(); cursor.insertText("Qt Linguist"); list2->add(textBlock); -} cMainWindow::cMainWindow(QWidget *parent) : QMainWindow(parent), - ui(new Ui::cMainWindow) + ui(new Ui::cMainWindow), + m_bUpdatingTab(false) { ui->setupUi(this); - ui->m_lpTabWidget->setCurrentIndex(0); - g_lpInputDocument = new cTextDocument(ui->m_lpInput); - g_lpOutputDocument = new cTextDocument(ui->m_lpOutput); + cStructureWindow* lpStructureWindow = new cStructureWindow(this); + cWidget* lpWidget1 = new cWidget(lpStructureWindow); + lpWidget1->setWindow(ui->m_lpMdiArea->addSubWindow(lpStructureWindow)); - ui->m_lpInput->setDocument(g_lpInputDocument); + QMainWindow* lpMainWindow = new QMainWindow(this); + lpMainWindow->setWindowTitle("Bla"); + cWidget* lpWidget2 = new cWidget(lpMainWindow); + lpWidget2->setWindow(ui->m_lpMdiArea->addSubWindow(lpMainWindow)); - readWriteTest1(); -// readWriteTest2(); -// readWriteTest3(); + ui->m_lpMainTab->addTab((QWidget*)lpWidget1, "Structure"); + ui->m_lpMainTab->addTab((QWidget*)lpWidget2, "Bla"); + +// g_lpInputDocument = new cTextDocument(ui->m_lpInput); +// g_lpOutputDocument = new cTextDocument(ui->m_lpOutput); + +// ui->m_lpInput->setDocument(g_lpInputDocument); } cMainWindow::~cMainWindow() { delete ui; - - if(g_lpInputDocument) - delete g_lpInputDocument; - - if(g_lpOutputDocument) - delete g_lpOutputDocument; } -void cMainWindow::on_actionTest1_triggered() +//void cMainWindow::on_actionSave_triggered() +//{ +//#ifdef __linux__ +// #ifdef WITH_ZIP +// g_lpInputDocument->saveAs("/tmp/qtStoryWriter/documentText.zip", false); +// cDocumentReader reader("/tmp/qtStoryWriter/documentText.zip", false); +// #else +// g_lpInputDocument->saveAs("/tmp/qtStoryWriter/documentText.xml", false); +// cDocumentReader reader("/tmp/qtStoryWriter/documentText.xml", false); +// #endif +//#elif _WIN32 +// #ifdef WITH_ZIP +// g_lpInputDocument->saveAs("C:/Temp/qtStoryWriter/documentText.zip", false); +// cDocumentReader reader("C:/Temp/qtStoryWriter/documentText.zip", false); +// #else +// g_lpInputDocument->saveAs("C:/Temp/qtStoryWriter/documentText.xml", false); +// cDocumentReader reader("C:/Temp/qtStoryWriter/documentText.xml", false); +// #endif +// g_lpOutputDocument = reader.readDocument(); +// ui->m_lpOutput->setDocument(g_lpOutputDocument); +//#endif +//} + +void cMainWindow::on_m_lpMainTab_currentChanged(int index) { - QTextBlockFormat blockFormatStyle; - blockFormatStyle.setBackground(QColor("red")); - - QTextCursor cursor(g_lpInputDocument); - cursor.setBlockFormat(blockFormatStyle); - - QTextCharFormat charFormatStyle; + if(m_bUpdatingTab) + return; + m_bUpdatingTab = true; + cWidget* lpWidget = (cWidget*)ui->m_lpMainTab->currentWidget(); + QMdiSubWindow* lpWindow = lpWidget->window(); + ui->m_lpMdiArea->setActiveSubWindow(lpWindow); + m_bUpdatingTab = false; } -void cMainWindow::on_actionSave_triggered() +void cMainWindow::on_m_lpMdiArea_subWindowActivated(QMdiSubWindow *arg1) { -#ifdef __linux__ - #ifdef WITH_ZIP - g_lpInputDocument->saveAs("/tmp/qtStoryWriter/documentText.zip", false); - cDocumentReader reader("/tmp/qtStoryWriter/documentText.zip", false); - #else - g_lpInputDocument->saveAs("/tmp/qtStoryWriter/documentText.xml", false); - cDocumentReader reader("/tmp/qtStoryWriter/documentText.xml", false); - #endif -#elif _WIN32 - #ifdef WITH_ZIP - g_lpInputDocument->saveAs("C:/Temp/qtStoryWriter/documentText.zip", false); - cDocumentReader reader("C:/Temp/qtStoryWriter/documentText.zip", false); - #else - g_lpInputDocument->saveAs("C:/Temp/qtStoryWriter/documentText.xml", false); - cDocumentReader reader("C:/Temp/qtStoryWriter/documentText.xml", false); - #endif - g_lpOutputDocument = reader.readDocument(); - ui->m_lpOutput->setDocument(g_lpOutputDocument); -#endif + if(m_bUpdatingTab) + return; + + m_bUpdatingTab = true; + + for(int x = 0;x < ui->m_lpMainTab->count();x++) + { + cWidget* lpWidget = (cWidget*)ui->m_lpMainTab->widget(x); + if(lpWidget->window() == arg1) + { + ui->m_lpMainTab->setCurrentIndex(x); + m_bUpdatingTab = false; + return; + } + } + m_bUpdatingTab = false; } diff --git a/cmainwindow.h b/cmainwindow.h index 3f84cb7..2ca6433 100644 --- a/cmainwindow.h +++ b/cmainwindow.h @@ -2,6 +2,8 @@ #define CMAINWINDOW_H #include +#include + namespace Ui { class cMainWindow; @@ -16,12 +18,14 @@ public: ~cMainWindow(); private slots: - void on_actionTest1_triggered(); - void on_actionSave_triggered(); + void on_m_lpMainTab_currentChanged(int index); + void on_m_lpMdiArea_subWindowActivated(QMdiSubWindow *arg1); private: - Ui::cMainWindow *ui; + Ui::cMainWindow* ui; + + bool m_bUpdatingTab; }; #endif // CMAINWINDOW_H diff --git a/cmainwindow.ui b/cmainwindow.ui index 2ddcc3c..2513963 100644 --- a/cmainwindow.ui +++ b/cmainwindow.ui @@ -14,37 +14,55 @@ cMainWindow - - - - - 1 - - - - Input - - - - - - - - - - Output - - - - - - - - + + + + + + + -1 + + + true + + + true + + + true + + + + + + + Qt::ScrollBarAsNeeded + + + Qt::ScrollBarAsNeeded + + + QMdiArea::SubWindowView + + + true + + + true + + + true + + + QTabWidget::South + + + + - + 0 @@ -53,16 +71,15 @@ 21 - + - Test + &File - - + - + - + TopToolBarArea @@ -70,7 +87,7 @@ false - + Test1 @@ -81,15 +98,13 @@ Save + + + &Close + + - - - cTextEdit - QTextEdit -
ctextedit.h
-
-
diff --git a/cstructurewindow.cpp b/cstructurewindow.cpp new file mode 100644 index 0000000..cd62deb --- /dev/null +++ b/cstructurewindow.cpp @@ -0,0 +1,22 @@ +#include "cstructurewindow.h" +#include "ui_cstructurewindow.h" + +#include + + +cStructureWindow::cStructureWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::cStructureWindow) +{ + ui->setupUi(this); +} + +cStructureWindow::~cStructureWindow() +{ + delete ui; +} + +void cStructureWindow::closeEvent(QCloseEvent *event) +{ + event->ignore(); +} diff --git a/cstructurewindow.h b/cstructurewindow.h new file mode 100644 index 0000000..e469871 --- /dev/null +++ b/cstructurewindow.h @@ -0,0 +1,25 @@ +#ifndef CSTRUCTUREWINDOW_H +#define CSTRUCTUREWINDOW_H + +#include + +namespace Ui { +class cStructureWindow; +} + +class cStructureWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit cStructureWindow(QWidget *parent = 0); + ~cStructureWindow(); + +protected: + void closeEvent(QCloseEvent *event) override; + +private: + Ui::cStructureWindow* ui; +}; + +#endif // CSTRUCTUREWINDOW_H diff --git a/cstructurewindow.ui b/cstructurewindow.ui new file mode 100644 index 0000000..2cedab1 --- /dev/null +++ b/cstructurewindow.ui @@ -0,0 +1,49 @@ + + + cStructureWindow + + + + 0 + 0 + 800 + 600 + + + + Structure + + + + + + + + + + + + 0 + 0 + 800 + 21 + + + + + Test + + + + + + + + + Test + + + + + + diff --git a/cwidget.cpp b/cwidget.cpp new file mode 100644 index 0000000..f7858e9 --- /dev/null +++ b/cwidget.cpp @@ -0,0 +1,18 @@ +#include "cwidget.h" + + +cWidget::cWidget(QWidget *parent) : + QWidget(parent), + m_lpWindow(0) +{ +} + +void cWidget::setWindow(QMdiSubWindow* lpWindow) +{ + m_lpWindow = lpWindow; +} + +QMdiSubWindow *cWidget::window() +{ + return(m_lpWindow); +} diff --git a/cwidget.h b/cwidget.h new file mode 100644 index 0000000..ec0e45d --- /dev/null +++ b/cwidget.h @@ -0,0 +1,24 @@ +#ifndef CWIDGET_H +#define CWIDGET_H + +#include +#include + + +class cWidget : public QWidget +{ + Q_OBJECT +public: + explicit cWidget(QWidget *parent = nullptr); + void setWindow(QMdiSubWindow* lpWindow); + QMdiSubWindow* window(); + +signals: + +public slots: + +private: + QMdiSubWindow* m_lpWindow; +}; + +#endif // CWIDGET_H diff --git a/example.html b/example.html deleted file mode 100644 index e3a56d1..0000000 --- a/example.html +++ /dev/null @@ -1,79 +0,0 @@ -QTextEdit Example -

QTextEdit

-

The QTextEdit widget is an advanced editor that supports formatted rich text. It can be used to display HTML and other rich document formats. Internally, QTextEdit uses the QTextDocument class to describe both the high-level structure of each document and the low-level formatting of paragraphs.

-

If you are viewing this document in the textedit example, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment.

-

Font and Paragraph Styles

-

QTextEdit supports bold, italic, and underlined font styles, and can display multicolored text. Font families such as Times New Roman and Courier can also be used directly. If you place the cursor in a region of styled text, the controls in the tool bars will change to reflect the current style.

-

Paragraphs can be formatted so that the text is left-aligned, right-aligned, centered, or fully justified.

-

Try changing the alignment of some text and resize the editor to see how the text layout changes.

-

Lists

-

Different kinds of lists can be included in rich text documents. Standard bullet lists can be nested, using different symbols for each level of the list:

-
  • Disc symbols are typically used for top-level list items.
-
  • Circle symbols can be used to distinguish between items in lower-level lists.
-
  • Square symbols provide a reasonable alternative to discs and circles.
-

Ordered lists can be created that can be used for tables of contents. Different characters can be used to enumerate items, and we can use both Roman and Arabic numerals in the same list structure:

-
  1. Introduction
  2. -
  3. Qt Tools
-
  1. Qt Assistant
  2. -
  3. Qt Designer
  4. -
    1. Form Editor
    2. -
    3. Component Architecture
    -
  5. Qt Linguist
-

-

The list will automatically be renumbered if you add or remove items. Try adding new sections to the above list or removing existing item to see the numbers change.

-

-

Images

-

Inline images are treated like ordinary ranges of characters in the text editor, so they flow with the surrounding text. Images can also be selected in the same way as text, making it easy to cut, copy, and paste them.

-

Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and paste it into different parts of this document.

-

Tables

-

QTextEdit can arrange and format tables, supporting features such as row and column spans, text formatting within cells, and size constraints for columns.

-

-

- - - - - - - - - - - - - - - - - - - - - - -
-

-

Development Tools

-

Programming Techniques

-

Graphical User Interfaces

-

9:00 - 11:00

-

Introduction to Qt

-

11:00 - 13:00

-

Using qmake

-

Object-oriented Programming

-

Layouts in Qt

-

13:00 - 15:00

-

Qt Designer Tutorial

-

Extreme Programming

-

Writing Custom Styles

-

15:00 - 17:00

-

Qt Linguist and Internationalization

-

-

Try adding text to the cells in the table and experiment with the alignment of the paragraphs.

-

Hyperlinks

-

QTextEdit is designed to support hyperlinks between documents, and this feature is used extensively in Qt Assistant. Hyperlinks are automatically created when an HTML file is imported into an editor. Since the rich text framework supports hyperlinks natively, they can also be created programatically.

-

Undo and Redo

-

Full support for undo and redo operations is built into QTextEdit and the underlying rich text framework. Operations on a document can be packaged together to make editing a more comfortable experience for the user.

-

Try making changes to this document and press Ctrl+Z to undo them. You can always recover the original contents of the document.

diff --git a/images/logo32.png b/images/logo32.png deleted file mode 100644 index 5f91e9873b7852876a84f0853a092868618a3fb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1410 zcmV-|1%3L7P)v$L~SY6-f!x;i>HR#sK=^78fd z^~J@-XlZ9jN=O9;1SKaT932@F6bwK?KiJsVG&M1Ca&Vl(4EXr?&(F{A@9*K^;VmvI z-rnBl=jZ_e0ssI12t_Js|+|6Aoqv%b5VR3+&@t{S^PwGNDh`@iek**Q>Z7>0!uElblri*S-) zlJ-U4<0&Hl4JZ|bBEwL1ODpWS=y8&TSrKCbn#kV(d!}CjC8Y@bk6cm`uDc9_z53$;R2mG#|hWxbXhLH~z zLaN^k`Zz-jib?farw z)%*S9@@*x2{x(VwS{hU>AtVk;P1AyNR@ezWajq&soXhG9DqAZ)>Rd$0BY;B}4SG_ns5RUeEX zOx8ND1c8;%1RfNP`!NARRUN_f6am1S8{s&PQxc5zeBfsM>edRl0BN*ZO9D#)8>ZL%}Pjz|$tX^|4b0h{$W@Ux%et$1fQAtnc~_IYJydCNSu^IT>_ zH(P~c1SCZEF97iKTv+%SFlE-_Tk5ckvMd202&K7G4O*m`hBETw3c~dc=f4P|`TYvJ z>@<5`*SW4d*TW*aPWWiO<#BKh)S~^Xh+w>2pAoMtAAu_iB|uqrho$xEnW>i4P96%I z>TT`0b#7QCCTkm?yp8Mzk;$)dGgIEid$s#R9VOS3Aai1K23f2S9jkr#FkM+LL2+k~BONJB-N+SW6a}qWFBZ5|qLy10YuX z<}|`Wx`XfMl97;}s*OQ|&@Q4EpsF@}g?HC0EEBsw058{y0}ht21EBR9%W5Q)BndSR zh3$krJLt8}yBqVQ7vU*vHz|KDqykTnYKGMeW81dAWt`+DOHu{(sqHv1RA2@0I^NdN zj3NMW@h((5{Dur)A4X3?2Su;*f)JY)k0vPiMsdKJVFS*W@R2Rk2U{lWAmh;tiz{n5 zJ)<`^t3hybRT{^y8gPl#_K4RM_$WXxZo74zGXVH{w@5h+`jn+iG|gCYUn_g^>ubGw znwQPyvi-P=Vr9Z|a6qgegeXv8el<*@)P6gZrLI1j?!W;*REeMp%oR@reg?pf5;%&{ zEZx!|hyAaGp<^q)mCNX#e{Ecx2KE&&#cu&>TW?%sZyAkq*!OXtBnL&&OP=801ONzK z&<1Aj)XF-Hl<&kz3Q7uFDPuzZ2Y}#!8WbUQXw)WGl0rLAQxYYCfs};&1uTQy^!f3= Q0RR9107*qoM6N<$g5cAf`2YX_ diff --git a/qtStoryWriter.pro b/qtStoryWriter.pro index 2c49475..c0e0052 100644 --- a/qtStoryWriter.pro +++ b/qtStoryWriter.pro @@ -59,7 +59,9 @@ SOURCES += \ cdocumentwriter.cpp \ ctextdocument.cpp \ common.cpp \ - ctextedit.cpp + ctextedit.cpp \ + cstructurewindow.cpp \ + cwidget.cpp HEADERS += \ cmainwindow.h \ @@ -67,13 +69,15 @@ HEADERS += \ cdocumentwriter.h \ ctextdocument.h \ common.h \ - ctextedit.h + ctextedit.h \ + cstructurewindow.h \ + cwidget.h FORMS += \ - cmainwindow.ui + cmainwindow.ui \ + cstructurewindow.ui -DISTFILES += \ - example.html +DISTFILES += RESOURCES += \ qtstorywriter.qrc diff --git a/qtstorywriter.qrc b/qtstorywriter.qrc index def5add..ea4bca1 100644 --- a/qtstorywriter.qrc +++ b/qtstorywriter.qrc @@ -1,7 +1,5 @@ - example.html - images/logo32.png images/mac/editcopy.png images/mac/editcut.png images/mac/editpaste.png