aboutsummaryrefslogtreecommitdiff
path: root/src/settingswidget.cpp
diff options
context:
space:
mode:
authorLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-10 21:55:22 +0530
committerLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-10 21:55:22 +0530
commit7bc9214b73a3b593233d87e17b9d8bf1a82155c9 (patch)
tree7ae3a20396f4e03029121337ded08d66844feca8 /src/settingswidget.cpp
parent8af3b6ba89d6a97e82892f63de0fc97af3d53064 (diff)
downloadwhatsie-7bc9214b73a3b593233d87e17b9d8bf1a82155c9.tar.gz
whatsie-7bc9214b73a3b593233d87e17b9d8bf1a82155c9.zip
added permission dialog in settings window
Diffstat (limited to 'src/settingswidget.cpp')
-rw-r--r--src/settingswidget.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/settingswidget.cpp b/src/settingswidget.cpp
index fe91502..0b51099 100644
--- a/src/settingswidget.cpp
+++ b/src/settingswidget.cpp
@@ -12,8 +12,6 @@ SettingsWidget::SettingsWidget(QWidget *parent, QString engineCachePath, QString
{
ui->setupUi(this);
- ui->disableVideosCheckBox->hide();//impl later
-
this->engineCachePath = engineCachePath;
this->enginePersistentStoragePath = enginePersistentStoragePath;
@@ -225,12 +223,6 @@ void SettingsWidget::on_setUserAgent_clicked()
}
-
-void SettingsWidget::on_disableVideosCheckBox_toggled(bool checked)
-{
- settings.setValue("disableVideos",checked);
-}
-
void SettingsWidget::on_closeButtonActionComboBox_currentIndexChanged(int index)
{
settings.setValue("closeButtonActionCombo",index);
@@ -274,7 +266,9 @@ void SettingsWidget::on_showShortcutsButton_clicked()
{
QWidget *sheet = new QWidget(this);
sheet->setWindowTitle(QApplication::applicationName()+" | Global shortcuts");
- sheet->setWindowFlag(Qt::Sheet);
+
+ sheet->setWindowFlags(Qt::Popup |Qt::FramelessWindowHint);
+ sheet->move(this->geometry().center()-sheet->geometry().center());
QVBoxLayout *layout = new QVBoxLayout(sheet);
sheet->setLayout(layout);
@@ -288,3 +282,16 @@ void SettingsWidget::on_showShortcutsButton_clicked()
sheet->setAttribute(Qt::WA_DeleteOnClose);
sheet->show();
}
+
+void SettingsWidget::on_showPermissionsButton_clicked()
+{
+ PermissionDialog *permissionDialog = new PermissionDialog(this);
+ permissionDialog->setWindowTitle(QApplication::applicationName()+" | "+tr("Feature permissions"));
+ permissionDialog->setWindowFlag(Qt::Dialog);
+ permissionDialog->move(this->geometry().center()-permissionDialog->geometry().center());
+ permissionDialog->setMinimumSize(485,310);
+ permissionDialog->adjustSize();
+ permissionDialog->show();
+
+}
+