mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-04 16:49:05 +00:00
Add import destination indicator
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <regex>
|
#include <regex>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QDesktopServices>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QStorageInfo>
|
#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] {
|
connect(ui->main, &QTreeWidget::itemSelectionChanged, [this] {
|
||||||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok)
|
ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok)
|
||||||
->setEnabled(!ui->main->selectedItems().empty());
|
->setEnabled(!ui->main->selectedItems().empty());
|
||||||
|
|||||||
+29
-1
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>300</height>
|
<height>320</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -58,6 +58,34 @@
|
|||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
|
|||||||
Reference in New Issue
Block a user