diff options
author | Kris Moore <kris@pcbsd.org> | 2014-09-04 11:42:13 -0400 |
---|---|---|
committer | Kris Moore <kris@pcbsd.org> | 2014-09-04 11:42:13 -0400 |
commit | 71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 (patch) | |
tree | ab29e864d1ae59d10cc6875af9541e3ad306b2fb /lumina-open/LFileDialog.h | |
parent | Initial commit (diff) | |
download | lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.gz lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.bz2 lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.zip |
Initial import of the lumina code from pcbsd git repo
Diffstat (limited to 'lumina-open/LFileDialog.h')
-rw-r--r-- | lumina-open/LFileDialog.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/lumina-open/LFileDialog.h b/lumina-open/LFileDialog.h new file mode 100644 index 00000000..e6a8f1fc --- /dev/null +++ b/lumina-open/LFileDialog.h @@ -0,0 +1,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 |