mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
* Initial implementation of Python data processors * Add RideEditor to PyFIx script editor * Enable write-access to activity data for python fixes * Add GC.deleteActivitySample method * Add GC.deleteSeries method * Check for python fix for changes before close * Build python fixes menu dynamically * Make python fixes first class data processors * Add GC.postProcess method * Check GC_WANT_PYTHON and "Enable Python" setting for python fixes * Add GC.createXDataSeries method * Clean up ScriptContext ctor mess * Support editing xdata series * PDP: Implement xdata append/remove methods
62 lines
1.1 KiB
C++
62 lines
1.1 KiB
C++
#ifndef FIXPYSCRIPTSDIALOG_H
|
|
#define FIXPYSCRIPTSDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QListWidget>
|
|
|
|
#include "GoldenCheetah.h"
|
|
#include "PythonChart.h"
|
|
#include "FixPySettings.h"
|
|
|
|
class ManageFixPyScriptsDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ManageFixPyScriptsDialog(Context *);
|
|
|
|
private slots:
|
|
void editClicked();
|
|
void delClicked();
|
|
|
|
private:
|
|
void reload(int selRow);
|
|
|
|
Context *context;
|
|
QListWidget *scripts;
|
|
QPushButton *edit, *del;
|
|
};
|
|
|
|
class EditFixPyScriptDialog : public QDialog, public PythonHost
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
EditFixPyScriptDialog(Context *, FixPyScript *fix, QWidget *parent);
|
|
|
|
PythonChart *chart() { return nullptr; }
|
|
bool readOnly() { return false; }
|
|
|
|
protected:
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
private slots:
|
|
void saveClicked();
|
|
void runClicked();
|
|
|
|
private:
|
|
void setScript(QString string);
|
|
bool isModified();
|
|
|
|
Context *context;
|
|
FixPyScript *pyFixScript;
|
|
FixPyRunner *pyRunner;
|
|
|
|
PythonConsole *console;
|
|
QLineEdit *scriptName;
|
|
QTextEdit *script;
|
|
QString text; // dummy if no python
|
|
};
|
|
|
|
#endif // FIXPYSCRIPTSDIALOG_H
|