gta5view/OptionsDialog.h

80 lines
2.4 KiB
C
Raw Normal View History

/******************************************************************************
2016-04-04 23:54:17 +02:00
* gta5sync GRAND THEFT AUTO V SYNC
2017-02-11 04:21:55 +01:00
* Copyright (C) 2016-2017 Syping
2016-04-04 23:54:17 +02:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
2016-04-26 14:59:14 +02:00
#include <QSize>
#include <QList>
2016-04-04 23:54:17 +02:00
#include <QDialog>
#include <QSettings>
#include <QTreeWidgetItem>
#include "ProfileDatabase.h"
2016-04-04 23:54:17 +02:00
namespace Ui {
class OptionsDialog;
}
class OptionsDialog : public QDialog
{
Q_OBJECT
public:
explicit OptionsDialog(ProfileDatabase *profileDB, QWidget *parent = 0);
void commitProfiles(QStringList profiles);
2016-04-04 23:54:17 +02:00
~OptionsDialog();
private slots:
void on_cmdOK_clicked();
2016-04-26 14:59:14 +02:00
void on_rbPicCustomRes_toggled(bool checked);
void on_cbPicCustomQuality_toggled(bool checked);
void on_hsPicQuality_valueChanged(int value);
2016-04-28 00:21:25 +02:00
void on_cbIgnoreAspectRatio_toggled(bool checked);
void on_cmdExploreFolder_clicked();
signals:
void settingsApplied(int contentMode, QString language);
2016-04-04 23:54:17 +02:00
private:
ProfileDatabase *profileDB;
2016-04-04 23:54:17 +02:00
Ui::OptionsDialog *ui;
QList<QTreeWidgetItem*> playerItems;
2016-04-28 00:21:25 +02:00
Qt::AspectRatioMode aspectRatio;
QString currentLanguage;
QString currentCFolder;
QString defaultProfile;
2016-04-26 14:59:14 +02:00
QString percentString;
QSettings *settings;
bool currentFFolder;
int contentMode;
2016-04-26 14:59:14 +02:00
int customQuality;
int defaultQuality;
QSize defExportSize;
QSize cusExportSize;
void setupTreeWidget();
void setupLanguageBox();
void setupRadioButtons();
void setupDefaultProfile();
2016-04-26 14:59:14 +02:00
void setupPictureSettings();
void setupCustomGTAFolder();
void setupSnapmaticPictureViewer();
void applySettings();
2016-04-04 23:54:17 +02:00
};
#endif // OPTIONSDIALOG_H