mirror of https://gitee.com/cxasm/notepad--.git
Merge branch 'master' into about
This commit is contained in:
commit
27b3ebf80b
|
@ -8,6 +8,7 @@ AboutNdd::AboutNdd(QWidget *parent)
|
|||
ui.label->setOpenExternalLinks(true);
|
||||
// 隐藏最大化、最小化按钮
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowMinMaxButtonsHint);
|
||||
connect(ui.aboutPushButton, &QPushButton::clicked, this, &AboutNdd::onButtonOkayClicked);
|
||||
}
|
||||
|
||||
AboutNdd::~AboutNdd()
|
||||
|
@ -17,3 +18,8 @@ void AboutNdd::appendText(QString text)
|
|||
{
|
||||
ui.nddMsgText->appendPlainText(text);
|
||||
}
|
||||
|
||||
void AboutNdd::onButtonOkayClicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@ public:
|
|||
|
||||
void appendText(QString text);
|
||||
|
||||
private slots:
|
||||
void onButtonOkayClicked();
|
||||
|
||||
private:
|
||||
Ui::AboutNddClass ui;
|
||||
};
|
||||
};
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>114</height>
|
||||
<height>180</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
|
@ -17,7 +17,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>AboutNdd</string>
|
||||
<string>About Notepad--</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="RealCompare.qrc">
|
||||
|
@ -33,25 +33,76 @@
|
|||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout0">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>General Public License</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="nddMsgText">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>This software is licensed under the terms of the GNU General Public License version 3 (GPLv3). You are free to redistribute and modify the software in accordance with the license.
|
||||
|
||||
This software is distributed with the hope that it will be useful, but without any warranties, including the implied warranties of merchantability or fitness for a particular purpose. Please see the GNU General Public License for more information.
|
||||
|
||||
A copy of the GPLv3 license should have been provided along with this software. If you have not received a copy, it can be found at https://www.gnu.org/licenses/.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><a href="https://gitee.com/cxasm/notepad--"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Click to get the latest version of notepad-- or source code</span></a></p></body></html></string>
|
||||
<string><html><head/><body><p>Home: <a href="https://gitee.com/cxasm/notepad--"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">https://gitee.com/cxasm/notepad--</span></a></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="nddMsgText">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>opensoure web:https://gitee.com/cxasm/notepad--</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="aboutPushButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Okay</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
|
|
@ -7317,14 +7317,19 @@ void CCNotePad::slot_hexGotoFile(qint64 addr)
|
|||
void CCNotePad::slot_about()
|
||||
{
|
||||
QMessageBox msgBox(this);
|
||||
QString msg = tr(R"(
|
||||
<a href="https://github.com/cxasm/notepad--">Github repo: cxasm/notepad--</a>
|
||||
<br/>
|
||||
<a href="https://gitee.com/cxasm/notepad--">China Gitee: cxasm/notepad--</a>
|
||||
)");
|
||||
|
||||
#if defined (Q_OS_MAC)
|
||||
msgBox.setText(tr("bugfix: https://github.com/cxasm/notepad-- \nchina: https://gitee.com/cxasm/notepad--"));
|
||||
msgBox.setDetailedText(QString("Notepad-- %1").arg(VersionStr));
|
||||
msgBox.setText(msg);
|
||||
msgBox.setDetailedText(QString("Notepad-- %1").arg(VersionStr));
|
||||
#else
|
||||
msgBox.setWindowTitle(QString("Notepad-- %1").arg(VersionStr));
|
||||
msgBox.setText(tr("bugfix: https://github.com/cxasm/notepad-- \nchina: https://gitee.com/cxasm/notepad--"));
|
||||
msgBox.setText(msg);
|
||||
#endif
|
||||
msgBox.setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
|
||||
msgBox.exec();
|
||||
}
|
||||
|
@ -7333,18 +7338,18 @@ void CCNotePad::slot_aboutNdd()
|
|||
{
|
||||
AboutNdd* pWin = new AboutNdd();
|
||||
pWin->setAttribute(Qt::WA_DeleteOnClose);
|
||||
QString title = tr("Ndd Version %1").arg(VersionStr);
|
||||
QString title = tr("Notepad-- Version %1").arg(VersionStr);
|
||||
pWin->setWindowTitle(title);
|
||||
pWin->appendText(title);
|
||||
int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
|
||||
if (1 == status)
|
||||
{
|
||||
pWin->appendText(tr("Registered Version"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pWin->appendText(tr("Free Trial"));
|
||||
}
|
||||
// int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
|
||||
// if (1 == status)
|
||||
// {
|
||||
// pWin->appendText(tr("Registered Version"));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pWin->appendText(tr("Free Trial"));
|
||||
// }
|
||||
pWin->show();
|
||||
registerEscKeyShort(pWin);
|
||||
#ifdef uos
|
||||
|
@ -7352,6 +7357,7 @@ void CCNotePad::slot_aboutNdd()
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
void CCNotePad::addWatchFilePath(QString filePath)
|
||||
{
|
||||
getRegularFilePath(filePath);
|
||||
|
@ -7646,25 +7652,25 @@ void CCNotePad::slot_donate()
|
|||
#endif
|
||||
}
|
||||
|
||||
void CCNotePad::slot_registerCmd(int cmd, int code)
|
||||
{
|
||||
if (cmd == 1)
|
||||
{
|
||||
//服务器返回注册码的消息。 //0 试用 1 正版 2 正版过期 3 错误key
|
||||
int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
|
||||
if (status != code)
|
||||
{
|
||||
NddSetting::updataKeyValueFromNumSets(SOFT_STATUS, code);
|
||||
}
|
||||
|
||||
emit signRegisterReplay(code);
|
||||
}
|
||||
}
|
||||
// void CCNotePad::slot_registerCmd(int cmd, int code)
|
||||
// {
|
||||
// if (cmd == 1)
|
||||
// {
|
||||
// //服务器返回注册码的消息。 //0 试用 1 正版 2 正版过期 3 错误key
|
||||
// int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS);
|
||||
// if (status != code)
|
||||
// {
|
||||
// NddSetting::updataKeyValueFromNumSets(SOFT_STATUS, code);
|
||||
// }
|
||||
//
|
||||
// emit signRegisterReplay(code);
|
||||
// }
|
||||
//}
|
||||
|
||||
//获取注册码
|
||||
void CCNotePad::slot_register()
|
||||
{
|
||||
}
|
||||
//void CCNotePad::slot_register()
|
||||
//{
|
||||
//}
|
||||
|
||||
//当前正在使用的所有语言的tags
|
||||
void CCNotePad::getCurUseLexerTags(QVector<QString>& tags)
|
||||
|
@ -8920,5 +8926,4 @@ void CCNotePad::slot_shortcutManager()
|
|||
adjustWInPos(pWin);
|
||||
#endif
|
||||
pWin->show();
|
||||
}
|
||||
|
||||
}
|
|
@ -178,7 +178,7 @@ public slots:
|
|||
void slot_batch_rename();
|
||||
void slot_options();
|
||||
void slot_donate();
|
||||
void slot_registerCmd(int cmd, int code);
|
||||
// void slot_registerCmd(int cmd, int code);
|
||||
void slot_viewStyleChange(QString tag, int styleId, QColor & fgColor, QColor & bkColor, QFont & font, bool fontChange);
|
||||
void slot_viewLexerChange(QString tag);
|
||||
void slot_findInDir();
|
||||
|
@ -278,7 +278,7 @@ private slots:
|
|||
void slot_toDarkStyle();
|
||||
void slot_toLavenderBlush();
|
||||
void slot_toMistyRose();*/
|
||||
void slot_register();
|
||||
//void slot_register();
|
||||
|
||||
void slot_slectionChanged();
|
||||
void slot_preHexPage();
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1458</width>
|
||||
<height>23</height>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
@ -87,7 +87,7 @@
|
|||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>&File</string>
|
||||
<string>File (&F)</string>
|
||||
</property>
|
||||
<addaction name="actionNewFile"/>
|
||||
<addaction name="actionOpenFile"/>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>&Edit</string>
|
||||
<string>Edit (&E)</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuformat_conversion">
|
||||
<property name="title">
|
||||
|
@ -180,11 +180,11 @@
|
|||
</widget>
|
||||
<widget class="QMenu" name="menuSearch">
|
||||
<property name="title">
|
||||
<string>&Search</string>
|
||||
<string>Search (&S)</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuBook_Mark">
|
||||
<property name="title">
|
||||
<string>Book Mark</string>
|
||||
<string>Bookmark</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuMark_Color">
|
||||
|
@ -204,7 +204,7 @@
|
|||
</widget>
|
||||
<widget class="QMenu" name="menuView">
|
||||
<property name="title">
|
||||
<string>&View</string>
|
||||
<string>View (&V)</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menudisplay_symbols">
|
||||
<property name="title">
|
||||
|
@ -232,7 +232,7 @@
|
|||
</widget>
|
||||
<widget class="QMenu" name="menuCode">
|
||||
<property name="title">
|
||||
<string>E&ncoding</string>
|
||||
<string>Encoding (&N)</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuASNI">
|
||||
<property name="title">
|
||||
|
@ -263,7 +263,7 @@
|
|||
</widget>
|
||||
<widget class="QMenu" name="menuLanguage">
|
||||
<property name="title">
|
||||
<string>&Language</string>
|
||||
<string>Language (&L)</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuP">
|
||||
<property name="title">
|
||||
|
@ -466,7 +466,7 @@
|
|||
</widget>
|
||||
<widget class="QMenu" name="menuSet">
|
||||
<property name="title">
|
||||
<string>Se&t</string>
|
||||
<string>Set (&T)</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuLanguage_2">
|
||||
<property name="title">
|
||||
|
@ -495,7 +495,7 @@
|
|||
</widget>
|
||||
<widget class="QMenu" name="menuTools">
|
||||
<property name="title">
|
||||
<string>T&ools</string>
|
||||
<string>Tools (&O)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
|
@ -1575,11 +1575,11 @@
|
|||
<string>Chinese</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRegister">
|
||||
<property name="text">
|
||||
<string>Register</string>
|
||||
</property>
|
||||
</action>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<action name="actionLanguage_Format">
|
||||
<property name="text">
|
||||
<string>Theme Style</string>
|
||||
|
@ -1904,7 +1904,7 @@
|
|||
</action>
|
||||
<action name="actioninfo">
|
||||
<property name="text">
|
||||
<string>AboutNdd</string>
|
||||
<string>About Notepad--</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action1">
|
||||
|
@ -2696,22 +2696,22 @@
|
|||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionRegister</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>CCNotePad</receiver>
|
||||
<slot>slot_register()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>601</x>
|
||||
<y>394</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<sender>actionLanguage_Format</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>CCNotePad</receiver>
|
||||
|
@ -3497,7 +3497,7 @@
|
|||
<slot>slot_toMistyRose()</slot>
|
||||
<slot>slot_changeEnglish()</slot>
|
||||
<slot>slot_changeChinese()</slot>
|
||||
<slot>slot_register()</slot>
|
||||
|
||||
<slot>slot_langFormat()</slot>
|
||||
<slot>slot_reOpenTextMode()</slot>
|
||||
<slot>slot_reOpenHexMode()</slot>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<item>
|
||||
<widget class="QCheckBox" name="leftBox">
|
||||
<property name="text">
|
||||
<string>save left document ?</string>
|
||||
<string>Save Left Document?</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<item>
|
||||
<widget class="QCheckBox" name="rightBox">
|
||||
<property name="text">
|
||||
<string>save right document ?</string>
|
||||
<string>Save Right Document?</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
|
@ -140,7 +140,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>save selected</string>
|
||||
<string>Save Selected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -159,7 +159,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>discard</string>
|
||||
<string>Discard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -178,7 +178,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>cancel</string>
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_find">
|
||||
<attribute name="title">
|
||||
|
@ -1462,8 +1462,8 @@
|
|||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>572</x>
|
||||
<y>251</y>
|
||||
<x>674</x>
|
||||
<y>288</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>169</x>
|
||||
|
@ -1510,8 +1510,8 @@
|
|||
<slot>slot_replaceFindNext()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>94</x>
|
||||
<y>60</y>
|
||||
<x>448</x>
|
||||
<y>69</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>588</x>
|
||||
|
@ -1526,8 +1526,8 @@
|
|||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>94</x>
|
||||
<y>45</y>
|
||||
<x>448</x>
|
||||
<y>213</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>588</x>
|
||||
|
@ -1542,8 +1542,8 @@
|
|||
<slot>slot_replace()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>94</x>
|
||||
<y>64</y>
|
||||
<x>448</x>
|
||||
<y>103</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>588</x>
|
||||
|
@ -1558,8 +1558,8 @@
|
|||
<slot>slot_replaceAll()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>94</x>
|
||||
<y>67</y>
|
||||
<x>448</x>
|
||||
<y>137</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>588</x>
|
||||
|
@ -1574,8 +1574,8 @@
|
|||
<slot>slot_replaceAllInOpenDoc()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>94</x>
|
||||
<y>76</y>
|
||||
<x>448</x>
|
||||
<y>180</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>588</x>
|
||||
|
@ -1638,8 +1638,8 @@
|
|||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>572</x>
|
||||
<y>142</y>
|
||||
<x>674</x>
|
||||
<y>171</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>564</x>
|
||||
|
@ -1718,8 +1718,8 @@
|
|||
<slot>slot_findPrev()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>484</x>
|
||||
<y>73</y>
|
||||
<x>674</x>
|
||||
<y>103</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>294</x>
|
||||
|
|
|
@ -37,7 +37,7 @@ ${PROJECT_SOURCE_DIR}/scintilla/include)
|
|||
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Concurrent Qt5::Network Qt5::PrintSupport)
|
||||
|
||||
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||
if(($ENV{CMAKE_BUILD_TYPE}) STREQUAL "Release")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "qmyedit_qt5")
|
||||
else()
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "qmyedit_qt5d")
|
||||
|
|
Loading…
Reference in New Issue