I sure hope it works now...
This commit is contained in:
parent
a05c099390
commit
04db6898b2
@ -5,6 +5,7 @@
|
|||||||
#include <settings.hpp>
|
#include <settings.hpp>
|
||||||
|
|
||||||
QMap<QString, QHotkey *> hotkeys;
|
QMap<QString, QHotkey *> hotkeys;
|
||||||
|
QList<QString> regNames;
|
||||||
|
|
||||||
// func gets bound only on first set, or load
|
// func gets bound only on first set, or load
|
||||||
void hotkeying::hotkey(QString seqName, QKeySequence seq, std::function<void()> func) {
|
void hotkeying::hotkey(QString seqName, QKeySequence seq, std::function<void()> func) {
|
||||||
@ -23,6 +24,7 @@ void hotkeying::load(QString seqName, std::function<void()> func, QString def) {
|
|||||||
QHotkey *h;
|
QHotkey *h;
|
||||||
QString name = seqName;
|
QString name = seqName;
|
||||||
name.prepend("hotkey_");
|
name.prepend("hotkey_");
|
||||||
|
if (hotkeys.contains(seqName)) return;
|
||||||
if (settings::settings().contains(name))
|
if (settings::settings().contains(name))
|
||||||
h = new QHotkey(QKeySequence(settings::settings().value(name).toString()), true);
|
h = new QHotkey(QKeySequence(settings::settings().value(name).toString()), true);
|
||||||
else
|
else
|
||||||
|
@ -134,6 +134,10 @@ void MainWindow::on_actionStop_triggered() {
|
|||||||
controller->end();
|
controller->end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionColor_Picker_triggered() {
|
||||||
|
ColorPickerScene::showPicker();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionSettings_triggered() {
|
void MainWindow::on_actionSettings_triggered() {
|
||||||
SettingsDialog *dialog = new SettingsDialog(this);
|
SettingsDialog *dialog = new SettingsDialog(this);
|
||||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
@ -25,9 +25,8 @@ private slots:
|
|||||||
void on_actionArea_triggered();
|
void on_actionArea_triggered();
|
||||||
void on_actionStart_triggered();
|
void on_actionStart_triggered();
|
||||||
void on_actionStop_triggered();
|
void on_actionStop_triggered();
|
||||||
|
|
||||||
void on_actionSettings_triggered();
|
void on_actionSettings_triggered();
|
||||||
|
void on_actionColor_Picker_triggered();
|
||||||
void on_actionAbout_triggered();
|
void on_actionAbout_triggered();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -80,6 +80,7 @@ void SettingsDialog::newUploader(Uploader *u) {
|
|||||||
QListWidgetItem *uploader = new QListWidgetItem(u->name(), ui->uploaderList);
|
QListWidgetItem *uploader = new QListWidgetItem(u->name(), ui->uploaderList);
|
||||||
uploader->setToolTip(u->description());
|
uploader->setToolTip(u->description());
|
||||||
ui->uploaderList->addItem(uploader);
|
ui->uploaderList->addItem(uploader);
|
||||||
|
if (UploaderSingleton::inst().currentUploader() == u->name()) ui->uploaderList->setCurrentItem(uploader);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::on_uploaderList_clicked(const QModelIndex &) {
|
void SettingsDialog::on_uploaderList_clicked(const QModelIndex &) {
|
||||||
@ -120,10 +121,6 @@ void SettingsDialog::on_hideToTray_clicked(bool checked) {
|
|||||||
settings::settings().setValue("hideOnClose", checked);
|
settings::settings().setValue("hideOnClose", checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::on_actionColor_Picker_triggered() {
|
|
||||||
ColorPickerScene::showPicker();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SettingsDialog::on_captureCursor_clicked(bool checked) {
|
void SettingsDialog::on_captureCursor_clicked(bool checked) {
|
||||||
settings::settings().setValue("captureCursor", checked);
|
settings::settings().setValue("captureCursor", checked);
|
||||||
}
|
}
|
||||||
|
@ -18,14 +18,13 @@ public:
|
|||||||
void setScheme(QString scheme);
|
void setScheme(QString scheme);
|
||||||
void newUploader(Uploader *u);
|
void newUploader(Uploader *u);
|
||||||
|
|
||||||
|
public slots:
|
||||||
void on_uploaderList_clicked(const QModelIndex &);
|
void on_uploaderList_clicked(const QModelIndex &);
|
||||||
void on_nameScheme_textEdited(const QString &arg1);
|
|
||||||
void on_delay_valueChanged(double arg1);
|
void on_delay_valueChanged(double arg1);
|
||||||
void on_hotkeys_doubleClicked(const QModelIndex &index);
|
void on_hotkeys_doubleClicked(const QModelIndex &index);
|
||||||
void on_settingsButton_clicked();
|
void on_settingsButton_clicked();
|
||||||
void on_quickMode_clicked(bool checked);
|
void on_quickMode_clicked(bool checked);
|
||||||
void on_hideToTray_clicked(bool checked);
|
void on_hideToTray_clicked(bool checked);
|
||||||
void on_actionColor_Picker_triggered();
|
|
||||||
void on_captureCursor_clicked(bool checked);
|
void on_captureCursor_clicked(bool checked);
|
||||||
void on_formatBox_currentIndexChanged(int index);
|
void on_formatBox_currentIndexChanged(int index);
|
||||||
void on_imageFormatBox_currentIndexChanged(int index);
|
void on_imageFormatBox_currentIndexChanged(int index);
|
||||||
|
@ -109,3 +109,7 @@ QString UploaderSingleton::selectedUploader() {
|
|||||||
QList<std::runtime_error> UploaderSingleton::errors() {
|
QList<std::runtime_error> UploaderSingleton::errors() {
|
||||||
return errs;
|
return errs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString UploaderSingleton::currentUploader() {
|
||||||
|
return uploader;
|
||||||
|
}
|
||||||
|
@ -20,6 +20,8 @@ public:
|
|||||||
void set(QString uploader);
|
void set(QString uploader);
|
||||||
QString selectedUploader();
|
QString selectedUploader();
|
||||||
QList<std::runtime_error> errors();
|
QList<std::runtime_error> errors();
|
||||||
|
QString currentUploader();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void newUploader(Uploader *u);
|
void newUploader(Uploader *u);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user