-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththreadhub.cpp
More file actions
44 lines (36 loc) · 1.32 KB
/
Copy paththreadhub.cpp
File metadata and controls
44 lines (36 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// ============================================================
// threadhub.cpp
// خيط منفصل لاختيار الملفات والمجلدات
// ============================================================
#include "threadhub.h"
#include <QFileDialog>
#include <QDir>
ThreadHub::ThreadHub(QObject *parent)
: QObject(parent)
{
}
// ─── اختيار ملف ─────────────────────────────────────────────
void ThreadHub::chooseFile()
{
QString filePath = QFileDialog::getOpenFileName(
nullptr,
"اختر ملف مضغوط أو ISO",
QDir::homePath(),
"All Supported (*.zip *.7z *.tar.gz *.tar.bz2 *.tar.xz *.iso);;"
"ZIP Files (*.zip);;ISO Files (*.iso);;All Files (*)"
);
emit fileSelected(filePath);
emit finished();
}
// ─── اختيار مجلد ─────────────────────────────────────────────
void ThreadHub::chooseDirectory()
{
QString folderPath = QFileDialog::getExistingDirectory(
nullptr,
"اختر مجلد الوجهة",
QDir::homePath(),
QFileDialog::ShowDirsOnly
);
emit directorySelected(folderPath);
emit finished();
}