forked from taseikyo/PyQt5-Apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
375 additions
and
0 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,6 @@ | ||
## 为什么你们就是不能加个空格呢? | ||
|
||
自动中英文混排自动加空格 | ||
|
||
前一个自动指本应用,后一个自动指 [vinta/pangu.py](https://github.com/vinta/pangu.py),避免每次都要手动运行,干脆直接搞一个有界面更友好的工具。 | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
pyuic5.exe mwin.ui -o ..\src\mwin.py | ||
|
||
pyrcc5.exe res.qrc -o ..\src\res_rc.py |
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,11 @@ | ||
#include "mwin.h" | ||
|
||
#include <QApplication> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
QApplication a(argc, argv); | ||
MWin w; | ||
w.show(); | ||
return a.exec(); | ||
} |
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,15 @@ | ||
#include "mwin.h" | ||
#include "ui_mwin.h" | ||
|
||
MWin::MWin(QWidget *parent) | ||
: QMainWindow(parent) | ||
, ui(new Ui::MWin) | ||
{ | ||
ui->setupUi(this); | ||
} | ||
|
||
MWin::~MWin() | ||
{ | ||
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,21 @@ | ||
#ifndef MWIN_H | ||
#define MWIN_H | ||
|
||
#include <QMainWindow> | ||
|
||
QT_BEGIN_NAMESPACE | ||
namespace Ui { class MWin; } | ||
QT_END_NAMESPACE | ||
|
||
class MWin : public QMainWindow | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
MWin(QWidget *parent = nullptr); | ||
~MWin(); | ||
|
||
private: | ||
Ui::MWin *ui; | ||
}; | ||
#endif // MWIN_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,169 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>MWin</class> | ||
<widget class="QMainWindow" name="MWin"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>730</width> | ||
<height>500</height> | ||
</rect> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<family>Microsoft YaHei</family> | ||
<pointsize>10</pointsize> | ||
</font> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Pangu Tools</string> | ||
</property> | ||
<property name="windowIcon"> | ||
<iconset resource="res.qrc"> | ||
<normaloff>:/images/cat.svg</normaloff>:/images/cat.svg</iconset> | ||
</property> | ||
<widget class="QWidget" name="centralwidget"> | ||
<layout class="QVBoxLayout" name="verticalLayout_2"> | ||
<item> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QLabel" name="label"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>100</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<property name="text"> | ||
<string>就不能加个空格呢?</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<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="QCheckBox" name="listen_clip_board"> | ||
<property name="font"> | ||
<font> | ||
<family>Microsoft YaHei</family> | ||
<pointsize>10</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>监听剪贴板</string> | ||
</property> | ||
<property name="checked"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QCheckBox" name="remove_newline"> | ||
<property name="font"> | ||
<font> | ||
<family>Microsoft YaHei</family> | ||
<pointsize>10</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>消除回车</string> | ||
</property> | ||
<property name="checked"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QCheckBox" name="replace_symbol"> | ||
<property name="text"> | ||
<string>中英符号替换</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QToolButton" name="pangu_btn"> | ||
<property name="cursor"> | ||
<cursorShape>PointingHandCursor</cursorShape> | ||
</property> | ||
<property name="text"> | ||
<string>Pangu</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QToolButton" name="copy_btn"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>60</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<property name="cursor"> | ||
<cursorShape>PointingHandCursor</cursorShape> | ||
</property> | ||
<property name="text"> | ||
<string>Copy</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<widget class="QGroupBox" name="groupBox"> | ||
<property name="title"> | ||
<string>原文</string> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
<item> | ||
<widget class="QTextEdit" name="before_txt"/> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QGroupBox" name="groupBox_2"> | ||
<property name="title"> | ||
<string>添加空格后</string> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout_3"> | ||
<item> | ||
<widget class="QTextEdit" name="after_txt"/> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<widget class="QMenuBar" name="menubar"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>730</width> | ||
<height>26</height> | ||
</rect> | ||
</property> | ||
</widget> | ||
<widget class="QStatusBar" name="statusbar"/> | ||
</widget> | ||
<resources> | ||
<include location="res.qrc"/> | ||
</resources> | ||
<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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
QT += core gui | ||
|
||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | ||
|
||
CONFIG += c++11 | ||
|
||
# The following define makes your compiler emit warnings if you use | ||
# any Qt feature that has been marked deprecated (the exact warnings | ||
# depend on your compiler). Please consult the documentation of the | ||
# deprecated API in order to know how to port your code away from it. | ||
DEFINES += QT_DEPRECATED_WARNINGS | ||
|
||
# You can also make your code fail to compile if it uses deprecated APIs. | ||
# In order to do so, uncomment the following line. | ||
# You can also select to disable deprecated APIs only up to a certain version of Qt. | ||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 | ||
|
||
SOURCES += \ | ||
main.cpp \ | ||
mwin.cpp | ||
|
||
HEADERS += \ | ||
mwin.h | ||
|
||
FORMS += \ | ||
mwin.ui | ||
|
||
# Default rules for deployment. | ||
qnx: target.path = /tmp/$${TARGET}/bin | ||
else: unix:!android: target.path = /opt/$${TARGET}/bin | ||
!isEmpty(target.path): INSTALLS += target | ||
|
||
RESOURCES += \ | ||
res.qrc |
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,5 @@ | ||
<RCC> | ||
<qresource prefix="/images"> | ||
<file>cat.svg</file> | ||
</qresource> | ||
</RCC> |
Oops, something went wrong.