blob: e6a8f1fcf78d63d0e82a6a9f8931374fe72e9105 (
plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
//===========================================
// Lumina-DE source code
// Copyright (c) 2013, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_OPEN_FILE_DIALOG_H
#define _LUMINA_OPEN_FILE_DIALOG_H
#include <QSettings>
#include <QDialog>
#include <QString>
#include <QStringList>
#include <QIcon>
#include <QFileDialog>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QSettings>
#include <QTextStream>
#include <QTreeWidgetItem>
#include "LuminaXDG.h" //From libLuminaUtils
namespace Ui{
class LFileDialog;
};
class LFileDialog : public QDialog{
Q_OBJECT
public:
LFileDialog(QWidget *parent = 0);
~LFileDialog();
//inputs
void setFileInfo(QString filename, QString extension, bool isFile = true);
//outputs
bool appSelected, setDefault;
QString appExec;
QString appPath;
QString appFile;
//static functions
static QString getDefaultApp(QString extension);
static void setDefaultApp(QString extension, QString appFile);
private:
Ui::LFileDialog *ui;
QString fileEXT;
QSettings *settings;
QStringList PREFAPPS;
//DB set/get
QStringList getPreferredApplications();
void setPreferredApplication(QString);
QString translateCat(QString);
private slots:
void updateUI();
void generateAppList();
//Internal UI slots
void radioChanged();
//void on_group_binary_toggled(bool checked);
void on_tool_ok_clicked();
void on_tool_cancel_clicked();
void on_tool_findBin_clicked();
void on_line_bin_textChanged();
};
#endif
|