tahoma2d/toonz/sources/toonzfarm/tfarmclient/scriptconfigpanel.h

64 lines
1.2 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef SCRIPTCONFIGPANEL_H
#define SCRIPTCONFIGPANEL_H
#include "submitpage.h"
#include "tw/tw.h"
#include "tw/textfield.h"
// forward declarations
class TLabel;
class TButton;
class ScriptConfigPanel;
//==============================================================================
2016-06-15 18:43:10 +12:00
class PathFileField : public TTextField {
ScriptConfigPanel *m_page;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
PathFileField(TWidget *parent, string name = "");
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void onFocusChange(bool on);
void close();
void keyDown(int key, unsigned long flags, const TPoint &p);
2016-03-19 06:57:51 +13:00
};
//==============================================================================
2016-06-15 18:43:10 +12:00
class ScriptConfigPanel : public TaskConfigPanel {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
ScriptConfigPanel(TWidget *parent);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void configureNotify(const TDimension &d);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void browseFiles();
void setTask(SubmitPageTask *task);
SubmitPageTask *getTask() const;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void loadScript(const TFilePath &fp);
void onTextField(string value, int type);
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
ScriptTask *m_task;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TLabel *m_fileLbl;
PathFileField *m_file;
TButton *m_browseBtn;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TLabel *m_arg2Lbl;
TTextField *m_arg2;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TLabel *m_arg3Lbl;
TTextField *m_arg3;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TLabel *m_arg4Lbl;
TTextField *m_arg4;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TLabel *m_arg5Lbl;
TTextField *m_arg5;
2016-03-19 06:57:51 +13:00
};
#endif