10#include "scriptsmanager.h"
11#include "ui_scriptsmanager.h"
12#include "auxiliary/ksnotification.h"
14#include "scriptsmanager.h"
15#include "ui_scriptsmanager.h"
19ScriptsManager::ScriptsManager(
QWidget *parent) :
21 ui(new Ui::ScriptsManager)
34void ScriptsManager::handleSelectScripts()
36 QPushButton *button = qobject_cast<QPushButton*>(sender());
41 if (button == ui->preJobB)
42 title =
i18nc(
"@title:window",
"Pre Job Script");
43 else if (button == ui->postJobB)
44 title =
i18nc(
"@title:window",
"Post Job Script");
45 else if (button == ui->postCaptureB)
46 title =
i18nc(
"@title:window",
"Post Capture Script");
47 else if (button == ui->preCaptureB)
48 title =
i18nc(
"@title:window",
"Pre Capture Script");
59 KSNotification::error(
i18n(
"File %1 is not executable.", localFile));
63 if (button == ui->preJobB)
64 ui->preJobScript->setText(localFile);
65 else if (button == ui->postJobB)
66 ui->postJobScript->setText(localFile);
67 else if (button == ui->postCaptureB)
68 ui->postCaptureScript->setText(localFile);
69 else if (button == ui->preCaptureB)
70 ui->preCaptureScript->setText(localFile);
78 ui->preJobScript->setText(scripts[SCRIPT_PRE_JOB]);
79 ui->postJobScript->setText(scripts[SCRIPT_POST_JOB]);
80 ui->preCaptureScript->setText(scripts[SCRIPT_PRE_CAPTURE]);
81 ui->postCaptureScript->setText(scripts[SCRIPT_POST_CAPTURE]);
96ScriptsManager::~ScriptsManager()
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
Ekos is an advanced Astrophotography tool for Linux.
@ SCRIPT_POST_CAPTURE
Script to run after a sequence capture is completed.
@ SCRIPT_POST_JOB
Script to run after a sequence job is completed.
@ SCRIPT_PRE_CAPTURE
Script to run before a sequence capture is started.
@ SCRIPT_PRE_JOB
Script to run before a sequence job is started.
QUrl getOpenFileUrl(QWidget *parent, const QString &caption, const QUrl &dir, const QString &filter, QString *selectedFilter, Options options, const QStringList &supportedSchemes)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
bool isValid() const const
QString toLocalFile() const const