mirror of https://gitee.com/cxasm/notepad--.git
美化界面
This commit is contained in:
parent
2b3e9b6314
commit
c3db4ae41d
|
@ -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)
|
||||
{
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
|
|
184
src/renamewin.ui
184
src/renamewin.ui
|
@ -38,6 +38,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonBrowse">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
|
@ -54,76 +60,96 @@
|
|||
<attribute name="title">
|
||||
<string>AddDelNameString</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="radioButtonAddPrefix">
|
||||
<property name="text">
|
||||
<string>Add Prefix</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="radioButtonAddPrefix">
|
||||
<property name="text">
|
||||
<string>Add Prefix</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditAddPrefix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="radioButtonDelPrefix">
|
||||
<property name="text">
|
||||
<string>Del Prefix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lineEditDelPrefix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="radioButtonAddSuffix">
|
||||
<property name="text">
|
||||
<string>Add Suffix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditAddSuffix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QRadioButton" name="radioButtonDelSuffix">
|
||||
<property name="text">
|
||||
<string>Del Suffix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="lineEditDelSuffix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QRadioButton" name="radioButtonLower">
|
||||
<property name="text">
|
||||
<string>Lower FileName</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QRadioButton" name="radioButtonUpper">
|
||||
<property name="text">
|
||||
<string>Upper FileName</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditAddPrefix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="radioButtonDelPrefix">
|
||||
<property name="text">
|
||||
<string>Del Prefix</string>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lineEditDelPrefix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="radioButtonAddSuffix">
|
||||
<property name="text">
|
||||
<string>Add Suffix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditAddSuffix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QRadioButton" name="radioButtonDelSuffix">
|
||||
<property name="text">
|
||||
<string>Del Suffix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="lineEditDelSuffix">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QRadioButton" name="radioButtonLower">
|
||||
<property name="text">
|
||||
<string>Lower FileName</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QRadioButton" name="radioButtonUpper">
|
||||
<property name="text">
|
||||
<string>Upper FileName</string>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
@ -131,44 +157,40 @@
|
|||
<attribute name="title">
|
||||
<string>ChangeExt</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Modify Ext To</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditDestExt"/>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>78</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Deal Ext Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBoxExt">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
|
@ -183,14 +205,14 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QToolButton" name="definedFilterExt">
|
||||
<property name="text">
|
||||
<string>defined</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="3">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue