diff --git a/src/cceditor/ccnotepad.cpp b/src/cceditor/ccnotepad.cpp index 23bafc6..b5ada36 100755 --- a/src/cceditor/ccnotepad.cpp +++ b/src/cceditor/ccnotepad.cpp @@ -7387,7 +7387,7 @@ void CCNotePad::slot_gotoline() int lineCounts = 2147483647; bool ok; - int num = QInputDialog::getInt(this, tr("Go to line"), tr("Line Num:"), 1, 1, lineCounts, 1, &ok); + int num = QInputDialog::getInt(this, tr("Go to line"), tr("Line Num:"), 1, 1, lineCounts, 1, &ok,Qt::WindowCloseButtonHint); if (ok) { diff --git a/src/columnedit.cpp b/src/columnedit.cpp index d607042..b9f74cf 100755 --- a/src/columnedit.cpp +++ b/src/columnedit.cpp @@ -7,7 +7,7 @@ ColumnEdit::ColumnEdit(QWidget *parent) ui.setupUi(this); connect(ui.addPrefix, &QCheckBox::stateChanged, this, &ColumnEdit::slot_addPrefix); - connect(ui.is16, &QRadioButton::clicked, this, &ColumnEdit::slot_bigChar); + connect(ui.is16, &QRadioButton::toggled, this, &ColumnEdit::slot_bigChar); } ColumnEdit::~ColumnEdit() diff --git a/src/doctypelistview.cpp b/src/doctypelistview.cpp index 3ab3ca2..59ab043 100755 --- a/src/doctypelistview.cpp +++ b/src/doctypelistview.cpp @@ -247,7 +247,7 @@ void DocTypeListView::slot_customContextMenuRequested(const QPoint& /*pos*/) void DocTypeListView::slot_addCustomType() { bool ok = false; - QString text = QInputDialog::getText(this, tr("input file ext()"), tr("ext (Split With :)"), QLineEdit::Normal, QString(".h:.cpp"), &ok); + QString text = QInputDialog::getText(this, tr("input file ext()"), tr("ext (Split With :)"), QLineEdit::Normal, QString(".h:.cpp"), &ok,Qt::WindowCloseButtonHint); if (ok && !text.isEmpty()) { diff --git a/src/encodeconvert.cpp b/src/encodeconvert.cpp index d08fd67..d8dd263 100755 --- a/src/encodeconvert.cpp +++ b/src/encodeconvert.cpp @@ -109,7 +109,7 @@ void EncodeConvert::slot_itemClicked(QTreeWidgetItem* item, int /*column*/) void EncodeConvert::slot_userDefineExt() { bool ok = false; - QString text = QInputDialog::getText(this, tr("input file ext()"),tr("ext (Split With :)"), QLineEdit::Normal, QString(".h:.cpp"), &ok); + QString text = QInputDialog::getText(this, tr("input file ext()"),tr("ext (Split With :)"), QLineEdit::Normal, QString(".h:.cpp"), &ok,Qt::WindowCloseButtonHint); if (ok && !text.isEmpty()) { diff --git a/src/langstyledefine.cpp b/src/langstyledefine.cpp index 3945159..bd0d34a 100755 --- a/src/langstyledefine.cpp +++ b/src/langstyledefine.cpp @@ -102,7 +102,7 @@ void LangStyleDefine::loadUserLangs() void LangStyleDefine::slot_new() { - QString name = QInputDialog::getText(this, tr("Create New Languages"), tr("Please Input Languages Name")); + QString name = QInputDialog::getText(this, tr("Create New Languages"), tr("Please Input Languages Name"),QLineEdit::Normal,QString(),nullptr,Qt::WindowCloseButtonHint); if (!name.isEmpty()) { diff --git a/src/progresswin.cpp b/src/progresswin.cpp index e8911ab..d57dd90 100755 --- a/src/progresswin.cpp +++ b/src/progresswin.cpp @@ -6,6 +6,9 @@ ProgressWin::ProgressWin(QWidget *parent) : QDialog(parent), m_curStep(0),m_isCancel(false) { ui.setupUi(this); + Qt::WindowFlags flags = Qt::Dialog; + flags |= Qt::WindowCloseButtonHint; + setWindowFlags(flags); } ProgressWin::~ProgressWin() diff --git a/src/renamewin.cpp b/src/renamewin.cpp index e0ff6bd..45c5a7c 100755 --- a/src/renamewin.cpp +++ b/src/renamewin.cpp @@ -19,6 +19,8 @@ ReNameWin::ReNameWin(QWidget *parent) connect(ui.radioButtonDelSuffix, &QRadioButton::toggled, this, [this](bool status) {slot_renameOptionsChange(4, status); }); connect(ui.radioButtonLower, &QRadioButton::toggled, this, [this](bool status) {slot_renameOptionsChange(5, status); }); connect(ui.radioButtonUpper, &QRadioButton::toggled, this, [this](bool status) {slot_renameOptionsChange(6, status); }); + + ui.radioButtonAddPrefix->toggled(true); } ReNameWin::~ReNameWin() @@ -55,7 +57,7 @@ void ReNameWin::slot_renameOptionsChange(int id, bool status) case 4: ui.lineEditDelSuffix->setEnabled(status); break; - default: + default: break; } } @@ -63,7 +65,7 @@ void ReNameWin::slot_renameOptionsChange(int id, bool status) void ReNameWin::slot_userDefineExt() { bool ok = false; - QString text = QInputDialog::getText(this, tr("input file ext()"), tr("ext (Start With .)"), QLineEdit::Normal, QString(".cpp"), &ok); + QString text = QInputDialog::getText(this, tr("input file ext()"), tr("ext (Start With .)"), QLineEdit::Normal, QString(".cpp"), &ok,Qt::WindowCloseButtonHint); if (ok && !text.isEmpty()) { @@ -216,7 +218,7 @@ void ReNameWin::changeFileName() return QString("%1/%2.%3").arg(dir.absolutePath()).arg(fi.baseName().toLower()).arg(fi.suffix()); case 5: return QString("%1/%2.%3").arg(dir.absolutePath()).arg(fi.baseName().toUpper()).arg(fi.suffix()); - default: + default: break; } return QString(); diff --git a/src/renamewin.ui b/src/renamewin.ui index 2717617..d7e1f53 100755 --- a/src/renamewin.ui +++ b/src/renamewin.ui @@ -38,6 +38,12 @@ + + + 0 + 0 + + Browse @@ -54,76 +60,96 @@ AddDelNameString - - - - - Add Prefix - - + + + + + + + Add Prefix + + + true + + + + + + + false + + + + + + + Del Prefix + + + + + + + false + + + + + + + Add Suffix + + + + + + + false + + + + + + + Del Suffix + + + + + + + false + + + + + + + Lower FileName + + + + + + + Upper FileName + + + + - - - - false + + + + Qt::Vertical - - - - - - Del Prefix + + + 20 + 35 + - - - - - - false - - - - - - - Add Suffix - - - - - - - false - - - - - - - Del Suffix - - - - - - - false - - - - - - - Lower FileName - - - - - - - Upper FileName - - + @@ -131,44 +157,40 @@ ChangeExt - + - - + + Modify Ext To - + - + Qt::Horizontal - 40 + 78 20 - - - - - + Deal Ext Type - + @@ -183,14 +205,14 @@ - + defined - + Qt::Horizontal diff --git a/src/shortcutkeyeditwin.cpp b/src/shortcutkeyeditwin.cpp index dd22277..0ede785 100755 --- a/src/shortcutkeyeditwin.cpp +++ b/src/shortcutkeyeditwin.cpp @@ -5,8 +5,11 @@ ShortcutKeyEditWin::ShortcutKeyEditWin(QWidget *parent) : QDialog(parent) { - ui.setupUi(this); + ui.setupUi(this); ui.keySequenceEdit->setFocus(); + Qt::WindowFlags flags = Qt::Dialog; + flags |= Qt::WindowCloseButtonHint; + setWindowFlags(flags); } ShortcutKeyEditWin::~ShortcutKeyEditWin()