1 // Copyright (c) 2012 Dennco Project
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 // Created by tkawata on Nov-3, 2012.
19 #ifndef DCCELLCODEEDITORPAGEWIDGET_H
20 #define DCCELLCODEEDITORPAGEWIDGET_H
30 class DCCellScriptsEditorPageWidget : public QWidget
35 DCCellCode *d_cellCodeOrg;
36 DCCodeEditor *d_customScriptEditor;
37 DCCodeEditor *d_cellCodeScriptEditor;
39 QSplitter *d_splitter;
42 bool saveCustomScriptToFilePrivate();
43 bool saveCellCodeScriptToFilePrivate(DCCellCode *cellCode);
46 DCCellScriptsEditorPageWidget(DCCell *targetCell, QWidget *parent = 0);
47 virtual ~DCCellScriptsEditorPageWidget();
49 bool getIsModified() const;
51 bool loadScriptsFormFile();
52 void setReadOnly(bool readOnly);
53 QSet<DCVCPage*> saveScriptsToFile(bool saveModifiedOnly);
54 bool saveCustomScriptOnlyToFile(bool saveModifiedOnly);
55 bool saveCellCodeScriptOnlyToFile(bool saveModifiedOnly);
58 void editingCellDestroyed(DCCell *cell);
59 void cellScriptsModifiedStatusChanged(QWidget *self, bool modified);
60 void cellScriptsSaved(QWidget *self);
63 void assignedCellCodeChanged();
65 void customScriptChanged();
66 void cellCodeScriptChanged();
69 #endif // DCCELLCODEEDITORPAGEWIDGET_H