mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-03 00:38:58 +00:00
Add import destination indicator
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <regex>
|
||||
#include <string>
|
||||
#include <QApplication>
|
||||
#include <QDesktopServices>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QStorageInfo>
|
||||
@@ -56,6 +57,14 @@ MainDialog::MainDialog(QWidget* parent) : QDialog(parent), ui(std::make_unique<U
|
||||
}
|
||||
});
|
||||
|
||||
ui->importDestination->setText(
|
||||
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::UserDir)));
|
||||
connect(ui->importDestinationButton, &QPushButton::clicked, [this] {
|
||||
QDesktopServices::openUrl(QUrl(
|
||||
QStringLiteral("file:///%1")
|
||||
.arg(QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::UserDir)))));
|
||||
});
|
||||
|
||||
connect(ui->main, &QTreeWidget::itemSelectionChanged, [this] {
|
||||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok)
|
||||
->setEnabled(!ui->main->selectedItems().empty());
|
||||
|
||||
+29
-1
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>300</height>
|
||||
<height>320</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -58,6 +58,34 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel">
|
||||
<property name="text">
|
||||
<string>Files will be imported to: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="importDestination"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="importDestinationButton">
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
|
||||
Reference in New Issue
Block a user