Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion application/widgets/createlvwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -250,6 +250,7 @@ void CreateLVWidget::botFrameSetting()
m_applyBtn->setAccessibleName("confirm");
//取消
m_cancleBtn = new DPushButton(tr("Cancel", "button"), m_botFrame);
m_cancleBtn->setObjectName("CreateLVWidgetCancleBtn");
m_cancleBtn->setAccessibleName("cancel");
//复原
m_reveBtn = new DPushButton(tr("Revert", "button"), m_botFrame);
Expand Down Expand Up @@ -349,6 +350,7 @@ void CreateLVWidget::partInfoShowing()
m_partFormateLabel->setPalette(infoPalette);

m_partFormateCombox = new DComboBox(m_partWidget);
m_partFormateCombox->setObjectName("CreateLVWidgetPartFormateCombox");
m_partFormateCombox->addItems(formateList);
m_partFormateCombox->setCurrentText("ext4");
m_partFormateCombox->setAccessibleName("File system");
Expand All @@ -358,13 +360,15 @@ void CreateLVWidget::partInfoShowing()
partSizeLabel->setPalette(infoPalette);

m_slider = new DSlider(Qt::Horizontal);
m_slider->setObjectName("CreateLVWidgetSlider");
m_slider->setMaximum(100);
m_slider->setValue(100);
m_slider->setAccessibleName("slider");
m_partSizeEdit = new DLineEdit(m_partWidget);
m_partSizeEdit->setObjectName("lvSize");
m_partSizeEdit->setAccessibleName("lvSize");
m_partComboBox = new DComboBox(m_partWidget);
m_partComboBox->setObjectName("CreateLVWidgetPartComboBox");
m_partComboBox->addItem("GiB");
m_partComboBox->addItem("MiB");
m_partComboBox->setCurrentText("GiB");
Expand Down
3 changes: 2 additions & 1 deletion application/widgets/createpartitiontabledialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -27,6 +27,7 @@ void CreatePartitionTableDialog::initUi()
{
qDebug() << "CreatePartitionTableDialog::initUi called.";
m_ComboBox = new DComboBox;
m_ComboBox->setObjectName("CreatePartitionTableDialogComboBox");
m_ComboBox->addItem("GPT");
m_ComboBox->addItem("MSDOS");
m_ComboBox->setAccessibleName("choosePartitionTable");
Expand Down
8 changes: 7 additions & 1 deletion application/widgets/createvgwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -254,9 +254,11 @@ void CreateVGWidget::initUi()
m_firstCenterStackedWidget->setCurrentIndex(0);

m_firstCancelButton = new DPushButton(this);
m_firstCancelButton->setObjectName("CreateVGWidgetFirstCancelButton");
m_firstCancelButton->setText(tr("Cancel", "button"));
m_firstCancelButton->setAccessibleName("firstCancel");
m_nextButton = new DSuggestButton(this);
m_nextButton->setObjectName("CreateVGWidgetNextButton");
m_nextButton->setText(tr("Next"));
m_nextButton->setAccessibleName("next");
m_nextButton->setDisabled(true);
Expand Down Expand Up @@ -336,6 +338,7 @@ void CreateVGWidget::initUi()
// m_selectSpaceLabel->setAlignment(Qt::AlignCenter);

m_selectSpaceLineEdit = new DLineEdit(this);
m_selectSpaceLineEdit->setObjectName("CreateVGWidgetSelectSpaceLineEdit");
m_selectSpaceLineEdit->setFixedSize(182, 36);
m_selectSpaceLineEdit->setAccessibleName("vgSize");
m_selectSpaceLineEdit->lineEdit()->setPlaceholderText("1-100");
Expand All @@ -358,6 +361,7 @@ void CreateVGWidget::initUi()
}

m_selectSpaceComboBox = new DComboBox(this);
m_selectSpaceComboBox->setObjectName("CreateVGWidgetSelectSpaceComboBox");
m_selectSpaceComboBox->setFixedSize(100, 36);
m_selectSpaceComboBox->addItem("MiB");
m_selectSpaceComboBox->addItem("GiB");
Expand Down Expand Up @@ -451,9 +455,11 @@ void CreateVGWidget::initUi()
m_selectedStackedWidget->setCurrentIndex(1);

m_secondCancelButton = new DPushButton(this);
m_secondCancelButton->setObjectName("CreateVGWidgetSecondCancelButton");
m_secondCancelButton->setText(tr("Cancel", "button"));
m_secondCancelButton->setAccessibleName("secondCancel");
m_previousButton = new DPushButton(this);
m_previousButton->setObjectName("CreateVGWidgetPreviousButton");
m_previousButton->setText(tr("Previous"));
m_previousButton->setAccessibleName("previous");
m_doneButton = new DSuggestButton(this);
Expand Down
4 changes: 4 additions & 0 deletions application/widgets/customcontrol/partitionwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ void PartitionWidget::botFrameSetting()
m_applyBtn->setAccessibleName("confirm");
//取消
m_cancleBtn = new DPushButton(tr("Cancel", "button"), m_botFrame);
m_cancleBtn->setObjectName("PartitionWidgetCancleBtn");
m_cancleBtn->setAccessibleName("cancel");
//复原
m_reveBtn = new DPushButton(tr("Revert", "button"), m_botFrame);
Expand Down Expand Up @@ -342,6 +343,7 @@ void PartitionWidget::partInfoShowing()
m_partFormateLabel->setPalette(infoPalette);

m_partFormateCombox = new DComboBox(m_partWidget);
m_partFormateCombox->setObjectName("PartitionWidgetPartFormateCombox");
m_partFormateCombox->addItems(formateList);
m_partFormateCombox->setCurrentText("ext4");
m_partFormateCombox->setAccessibleName("File system");
Expand All @@ -351,13 +353,15 @@ void PartitionWidget::partInfoShowing()
partSizeLabel->setPalette(infoPalette);

m_slider = new DSlider(Qt::Horizontal);
m_slider->setObjectName("PartitionWidgetSlider");
m_slider->setMaximum(100);
m_slider->setValue(100);
m_slider->setAccessibleName("slider");
m_partSizeEdit = new DLineEdit(m_partWidget);
m_partSizeEdit->setObjectName("partSize");
m_partSizeEdit->setAccessibleName("partSize");
m_partComboBox = new DComboBox(m_partWidget);
m_partComboBox->setObjectName("PartitionWidgetPartComboBox");
m_partComboBox->addItem("GiB");
m_partComboBox->addItem("MiB");
m_partComboBox->setCurrentText("GiB");
Expand Down
5 changes: 4 additions & 1 deletion application/widgets/customcontrol/passwordinputdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -89,18 +89,21 @@ void PasswordInputDialog::initUi()
#endif

m_inputPasswordEdit = new DPasswordEdit(this);
m_inputPasswordEdit->setObjectName("PasswordInputDialogInputPasswordEdit");
m_inputPasswordEdit->setAccessibleName("Password");
m_inputPasswordEdit->lineEdit()->setPlaceholderText(tr("Enter a password "));
m_inputPasswordEdit->setFixedHeight(36);
m_inputPasswordEdit->lineEdit()->setValidator(regExpValidator);

m_checkPasswordEdit = new DPasswordEdit(this);
m_checkPasswordEdit->setObjectName("PasswordInputDialogCheckPasswordEdit");
m_checkPasswordEdit->setAccessibleName("Repeat password");
m_checkPasswordEdit->lineEdit()->setPlaceholderText(tr("Enter the password again"));
m_checkPasswordEdit->setFixedHeight(36);
m_checkPasswordEdit->lineEdit()->setValidator(regExpValidator);

m_textEdit = new DTextEdit(this);
m_textEdit->setObjectName("PasswordInputDialogTextEdit");
m_textEdit->setAccessibleName("Password hint");
m_textEdit->setPlaceholderText(tr("Enter a password hint") + " (0/50)");
m_textEdit->setFixedHeight(84);
Expand Down
4 changes: 3 additions & 1 deletion application/widgets/customcontrol/selecteditemwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -58,6 +58,8 @@ void SelectedItemWidget::initUi()
// m_buttonLabel->setPixmap(DStyle::standardIcon(QApplication::style(), DStyle::SP_DeleteButton).pixmap(QSize(17, 17)));

m_iconButton = new DIconButton(this);
m_iconButton->setObjectName("SelectedItemWidgetIconButton");
m_iconButton->setAccessibleName("SelectedItemWidgetIconButton");
m_iconButton->setIcon(DStyle::standardIcon(QApplication::style(), DStyle::SP_DeleteButton));
m_iconButton->setIconSize(QSize(17, 17));
m_iconButton->setFixedSize(17, 17);
Expand Down
4 changes: 3 additions & 1 deletion application/widgets/customcontrol/selectpvitemwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -44,6 +44,8 @@ void SelectPVItemWidget::initUi()
fontSize.setPixelSize(12);

m_checkBox = new DCheckBox(this);
m_checkBox->setObjectName("SelectPVItemWidgetCheckBox");
m_checkBox->setAccessibleName("SelectPVItemWidgetCheckBox");

m_pathLabel = new DLabel(this);
m_pathLabel->setText("/dev/sda");
Expand Down
4 changes: 3 additions & 1 deletion application/widgets/cylinderinfowidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -131,6 +131,8 @@ void CylinderInfoWidget::initUI()
}

m_scrollBar = new DScrollBar(this);
m_scrollBar->setObjectName("CylinderInfoWidgetScrollBar");
m_scrollBar->setAccessibleName("CylinderInfoWidgetScrollBar");
m_scrollBar->setRange(0, rowCount - 15);
m_scrollBar->setPageStep(30);
m_scrollBar->setSingleStep(5);
Expand Down
6 changes: 5 additions & 1 deletion application/widgets/decryptdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -76,13 +76,15 @@ void DecryptDialog::initUi()
#endif

m_passwordEdit = new DPasswordEdit(this);
m_passwordEdit->setObjectName("DecryptDialogPasswordEdit");
m_passwordEdit->setAccessibleName("passwordInput");
m_passwordEdit->lineEdit()->setValidator(regExpValidator);
m_passwordEdit->lineEdit()->setPlaceholderText(tr("Enter a password "));
m_passwordEdit->setFixedHeight(37);
qDebug() << "[DecryptDialog] Password edit created.";

m_pushButton = new DPushButton(this);
m_pushButton->setObjectName("DecryptDialogPushButton");
m_pushButton->setAccessibleName("passwordHintButton");
m_pushButton->setToolTip(tr("Password hint"));
m_pushButton->setFixedSize(QSize(36, 36));
Expand Down Expand Up @@ -136,11 +138,13 @@ void DecryptDialog::initUi()
contentLayout->setContentsMargins(10, 0, 10, 0);

m_cancelButton = new DPushButton(tr("Cancel", "button"), this);
m_cancelButton->setObjectName("DecryptDialogCancelButton");
m_cancelButton->setAccessibleName("cancel");
m_cancelButton->setFont(font1);
m_cancelButton->setFixedSize(183, 36);

m_decryptButton = new DSuggestButton(tr("Decrypt", "button"), this);
m_decryptButton->setObjectName("DecryptDialogDecryptButton");
m_decryptButton->setAccessibleName("decrypt");
m_decryptButton->setFont(font1);
m_decryptButton->setFixedSize(183, 36);
Expand Down
10 changes: 9 additions & 1 deletion application/widgets/diskbadsectorsdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -71,6 +71,7 @@ void DiskBadSectorsDialog::initUI()
m_verifyLabel->setPalette(palette1);
// m_verifyLabel->setStyleSheet("background:yellow");
m_verifyComboBox = new DComboBox;
m_verifyComboBox->setObjectName("DiskBadSectorsDialogVerifyComboBox");
m_verifyComboBox->addItem(tr("Cylinders")); // 柱面范围
m_verifyComboBox->addItem(tr("Sectors")); // 扇区范围
m_verifyComboBox->addItem(tr("MB")); // 容量范围
Expand All @@ -91,6 +92,7 @@ void DiskBadSectorsDialog::initUI()
// QIntValidator *intValidator = new QIntValidator(0, QString("%1").arg(m_deviceInfo.cylinders).toInt(), this);

m_startLineEdit = new DLineEdit;
m_startLineEdit->setObjectName("DiskBadSectorsDialogStartLineEdit");
m_startLineEdit->setFixedHeight(36);
m_startLineEdit->setText("0");
m_startLineEdit->lineEdit()->setPlaceholderText("0");
Expand All @@ -100,6 +102,7 @@ void DiskBadSectorsDialog::initUI()
// m_startLineEdit->lineEdit()->setValidator(intValidator);

m_endLineEdit = new DLineEdit;
m_endLineEdit->setObjectName("DiskBadSectorsDialogEndLineEdit");
m_endLineEdit->setFixedHeight(36);
m_endLineEdit->setText(QString("%1").arg(m_deviceInfo.m_cylinders));
m_endLineEdit->lineEdit()->setPlaceholderText(QString("%1").arg(m_deviceInfo.m_cylinders));
Expand Down Expand Up @@ -144,13 +147,16 @@ void DiskBadSectorsDialog::initUI()
}

m_methodComboBox = new DComboBox;
m_methodComboBox->setObjectName("DiskBadSectorsDialogMethodComboBox");
m_methodComboBox->addItem(tr("Rounds")); // 检测次数
m_methodComboBox->addItem(tr("Timeout")); // 超时时间
m_methodComboBox->setFixedSize(155, 36);
DFontSizeManager::instance()->bind(m_methodComboBox, DFontSizeManager::T6, QFont::Medium);
m_methodComboBox->setAccessibleName("chooseMethod");

m_slider = new DSlider(Qt::Horizontal);
m_slider->setObjectName("DiskBadSectorsDialogSlider");
m_slider->setAccessibleName("DiskBadSectorsDialogSlider");
m_slider->setFixedWidth(90);
m_slider->setMinimum(1);
m_slider->setMaximum(100);
Expand All @@ -167,6 +173,7 @@ void DiskBadSectorsDialog::initUI()
#endif

m_checkTimesEdit = new DLineEdit;
m_checkTimesEdit->setObjectName("DiskBadSectorsDialogCheckTimesEdit");
m_checkTimesEdit->setText("8");
m_checkTimesEdit->setFixedSize(100, 36);
m_checkTimesEdit->lineEdit()->setValidator(validatorCheckTimes);
Expand All @@ -190,6 +197,7 @@ void DiskBadSectorsDialog::initUI()
checkTimesWidget->setLayout(checkTimesLayout);

m_timeoutEdit = new DLineEdit;
m_timeoutEdit->setObjectName("DiskBadSectorsDialogTimeoutEdit");
m_timeoutEdit->setText("3000");
m_timeoutEdit->lineEdit()->setValidator(new QIntValidator(100, 3000, this));
m_timeoutEdit->setFixedSize(144, 36);
Expand Down
5 changes: 4 additions & 1 deletion application/widgets/diskhealthdetectiondialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 - 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -164,6 +164,8 @@ void DiskHealthDetectionDialog::initUI()

// 属性列表
m_tableView = new DTableView(this);
m_tableView->setObjectName("DiskHealthDetectionDialogTableView");
m_tableView->setAccessibleName("DiskHealthDetectionDialogTableView");
m_standardItemModel = new QStandardItemModel(this);

m_tableView->setShowGrid(false);
Expand Down Expand Up @@ -312,6 +314,7 @@ void DiskHealthDetectionDialog::initUI()
DFontSizeManager::instance()->bind(stateTipsLabel, DFontSizeManager::T8, QFont::Normal);

m_linkButton = new DCommandLinkButton(tr("Export", "button")); // 导出
m_linkButton->setObjectName("DiskHealthDetectionDialogLinkButton");
DFontSizeManager::instance()->bind(m_linkButton, DFontSizeManager::T8, QFont::Medium);
#if QT_VERSION_MAJOR > 5
m_linkButton->setFixedWidth(m_linkButton->fontMetrics().boundingRect(QString(tr("Export", "button"))).width());
Expand Down
3 changes: 2 additions & 1 deletion application/widgets/diskinfodisplaydialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -109,6 +109,7 @@ void DiskInfoDisplayDialog::initUI()
}

m_linkButton = new DCommandLinkButton(tr("Export", "button")); // 导出
m_linkButton->setObjectName("DiskInfoDisplayDialogLinkButton");
DFontSizeManager::instance()->bind(m_linkButton, DFontSizeManager::T8, QFont::Medium);
QFontMetrics fmCapacity = m_linkButton->fontMetrics();
#if QT_VERSION_MAJOR > 5
Expand Down
8 changes: 7 additions & 1 deletion application/widgets/formatedialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only

Expand Down Expand Up @@ -96,6 +96,7 @@ void FormateDialog::initUi()
fileName->setPalette(palette3);
fileName->setFixedHeight(36);
m_fileNameEdit = new DLineEdit(this);
m_fileNameEdit->setObjectName("FormateDialogFileNameEdit");
m_fileNameEdit->setAccessibleName("partName");
#if QT_VERSION_MAJOR > 5
QRegularExpression re("^[\u4E00-\u9FA5A-Za-z0-9_]+$");
Expand All @@ -116,6 +117,7 @@ void FormateDialog::initUi()
formatName->setPalette(palette3);
formatName->setFixedHeight(36);
m_formatComboBox = new DComboBox(this);
m_formatComboBox->setObjectName("FormateDialogFormatComboBox");
m_formatComboBox->setAccessibleName("File system");
m_formatComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

Expand Down Expand Up @@ -175,6 +177,7 @@ void FormateDialog::initUi()
m_label = new DLabel(this);
m_label->setFixedHeight(36);
m_securityComboBox = new DComboBox(this);
m_securityComboBox->setObjectName("FormateDialogSecurityComboBox");
m_securityComboBox->setAccessibleName("Security");
m_securityComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

Expand Down Expand Up @@ -208,6 +211,7 @@ void FormateDialog::initUi()
wipingLabel->setPalette(palette3);

m_wipingMethodComboBox = new DComboBox(this);
m_wipingMethodComboBox->setObjectName("FormateDialogWipingMethodComboBox");
m_wipingMethodComboBox->setAccessibleName("Wiping method");
m_wipingMethodComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
QStringList wipingMethodlist;
Expand Down Expand Up @@ -273,9 +277,11 @@ void FormateDialog::initUi()
layout->setContentsMargins(0, 0, 0, 0);

m_pushButton = new DPushButton(tr("Cancel", "button"), this);
m_pushButton->setObjectName("FormateDialogPushButton");
m_pushButton->setAccessibleName("cancel");
m_pushButton->setFixedHeight(36);
m_warningButton = new DWarningButton(this);
m_warningButton->setObjectName("FormateDialogWarningButton");
m_warningButton->setText(tr("Wipe", "button"));
m_warningButton->setAccessibleName("wipeButton");
m_warningButton->setFixedHeight(36);
Expand Down
Loading
Loading