-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update shortcuts and add help dialog
- Loading branch information
1 parent
94ef02b
commit ef68a05
Showing
11 changed files
with
294 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "markdowneditorhelpdialog.h" | ||
#include "ui_markdowneditorhelpdialog.h" | ||
|
||
MarkdownEditorHelpDialog::MarkdownEditorHelpDialog(QWidget *parent) : | ||
QDialog(parent), | ||
ui(new Ui::MarkdownEditorHelpDialog) | ||
{ | ||
ui->setupUi(this); | ||
QImage img = QImage(QLatin1String(":/mdeditor/icons/markdown.png")); | ||
|
||
ui->logo_label->setPixmap(QPixmap::fromImage(img).scaled(QSize(128,128))); | ||
ui->logo_label->setText(QString::null); | ||
|
||
ui->label->adjustSize(); | ||
ui->label->setGeometry(QRect(328, 240, 329, 27*4)); //四倍行距 | ||
ui->label->setWordWrap(true); | ||
ui->label->setAlignment(Qt::AlignTop); | ||
|
||
ui->label->setOpenExternalLinks(true); | ||
} | ||
|
||
MarkdownEditorHelpDialog::~MarkdownEditorHelpDialog() | ||
{ | ||
delete ui; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef MARKDOWNEDITORHELPDIALOG_H | ||
#define MARKDOWNEDITORHELPDIALOG_H | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { | ||
class MarkdownEditorHelpDialog; | ||
} | ||
|
||
class MarkdownEditorHelpDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit MarkdownEditorHelpDialog(QWidget *parent = 0); | ||
~MarkdownEditorHelpDialog(); | ||
|
||
private: | ||
Ui::MarkdownEditorHelpDialog *ui; | ||
}; | ||
|
||
#endif // MARKDOWNEDITORHELPDIALOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>MarkdownEditorHelpDialog</class> | ||
<widget class="QDialog" name="MarkdownEditorHelpDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>619</width> | ||
<height>360</height> | ||
</rect> | ||
</property> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>700</width> | ||
<height>700</height> | ||
</size> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>About Markdown Editor</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="0" column="0"> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<spacer name="verticalSpacer_2"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="logo_label"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>131</width> | ||
<height>161</height> | ||
</size> | ||
</property> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>153</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</item> | ||
<item row="0" column="1"> | ||
<layout class="QVBoxLayout" name="verticalLayout_2"> | ||
<item> | ||
<widget class="QLabel" name="label"> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>700</width> | ||
<height>700</height> | ||
</size> | ||
</property> | ||
<property name="text"> | ||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | ||
<html><head><meta name="qrichtext" content="1" /><style type="text/css"> | ||
p, li { white-space: pre-wrap; } | ||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">QtCreator Markdown Editor Plugin</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Markdown Editor Plugin is a plugin allowing developers to create and edit markdown files in Qt Creator IDE.</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">It supports the </span><a href="https://daringfireball.net/projects/markdown"><span style=" text-decoration: underline; color:#0000ff;">standard Markdown</span></a><span style=" font-size:10pt;">, </span><a href="https://www.mathjax.org/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">MathJax</span></a><span style=" font-size:10pt;">, </span><a href="https://bramp.github.io/js-sequence-diagrams/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">js-sequence-diagrams </span></a><span style=" font-size:10pt;">and </span><a href="http://flowchart.js.org/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">flowChart</span></a><span style=" font-size:10pt;"> syntax.</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Donnot commit its output files (*.html file and .mardown folder) to SVN or GIT, they can be generated by the plugin automatically. The html files can also be displayed in browsers like ie, chrome, etc.</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">see more at </span><a href="https://github.com/weijiaming/QtCreator-Markdown-Editor-Plugin"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">https://github.com/weijiaming/QtCreator-Markdown-Editor-Plugin</span></a></p></body></html></string> | ||
</property> | ||
<property name="textFormat"> | ||
<enum>Qt::RichText</enum> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer_3"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="pushButton"> | ||
<property name="text"> | ||
<string>Close</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>pushButton</sender> | ||
<signal>clicked()</signal> | ||
<receiver>MarkdownEditorHelpDialog</receiver> | ||
<slot>close()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>567</x> | ||
<y>339</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>611</x> | ||
<y>260</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.