File indexing completed on 2024-12-22 04:17:25
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2014 Barth Netterfield * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 0013 #ifndef ARROWSCRIPTINTERFACE_H 0014 #define ARROWSCRIPTINTERFACE_H 0015 0016 #include <QByteArray> 0017 #include <QString> 0018 #include <QList> 0019 #include <QObject> 0020 0021 #include "viewitemscriptinterface.h" 0022 #include "arrowitem.h" 0023 0024 namespace Kst { 0025 0026 struct ArrowTabSI; 0027 0028 class ArrowSI : public ScriptInterface 0029 { 0030 Q_OBJECT 0031 public: 0032 explicit ArrowSI(ArrowItem* it); 0033 QString doCommand(QString); 0034 bool isValid(); 0035 QByteArray endEditUpdate() {if (_dim->item) _dim->item->update();return ("Finished editing "+_dim->item->Name()).toLatin1();} 0036 0037 static ScriptInterface* newArrow(); 0038 0039 private: 0040 DimensionTabSI *_dim; 0041 FillTabSI *_fill; 0042 StrokeTabSI *_stroke; 0043 ArrowTabSI *_arrow; 0044 }; 0045 0046 0047 } 0048 0049 #endif // ARROWSCRIPTINTERFACE_H