File indexing completed on 2024-12-22 04:17:35
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2012 C. 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 LINEDIMENSIONSTAB_H 0014 #define LINEDIMENSIONSTAB_H 0015 0016 #include "dialogtab.h" 0017 #include "viewitem.h" 0018 #include "ui_linedimensionstab.h" 0019 0020 #include "kst_export.h" 0021 0022 namespace Kst { 0023 0024 class LineDimensionsTab : public DialogTab, Ui::LineDimensionsTab { 0025 Q_OBJECT 0026 public: 0027 explicit LineDimensionsTab(ViewItem* viewItem, QWidget *parent); 0028 0029 void setupDimensions(); 0030 0031 double x1() {return _p1X->value();} 0032 double x2() {return _p2X->value();} 0033 double y1() {return _p1Y->value();} 0034 double y2() {return _p2Y->value();} 0035 0036 bool lockPosToData() const {return _lockPosToData->isChecked();} 0037 bool lockPosToDataDirty() const; 0038 0039 void enableSingleEditOptions(bool enabled); 0040 void clearTabValues(); 0041 0042 public Q_SLOTS: 0043 void fillDimensions(bool lock_pos_to_data); 0044 0045 private: 0046 ViewItem *_viewItem; 0047 0048 private Q_SLOTS: 0049 void modified(); 0050 0051 Q_SIGNALS: 0052 void tabModified(); 0053 }; 0054 0055 } 0056 0057 #endif // LINEDIMENSIONSTAB_H