File indexing completed on 2024-12-22 04:17:26

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 CIRCLEDIMENSIONSTAB_H
0014 #define CIRCLEDIMENSIONSTAB_H
0015 
0016 #include "dialogtab.h"
0017 #include "viewitem.h"
0018 #include "ui_circledimensionstab.h"
0019 
0020 #include "kst_export.h"
0021 
0022 namespace Kst {
0023 
0024 class CircleDimensionsTab : public DialogTab, Ui::CircleDimensionsTab {
0025     Q_OBJECT
0026   public:
0027     explicit CircleDimensionsTab(ViewItem* viewItem, QWidget *parent);
0028 
0029     void setupDimensions();
0030 
0031     double x() {return _x->value();}
0032     double y() {return _y->value();}
0033 
0034     double radius() {return _radius->value();}
0035     bool radiusDirty() const;
0036 
0037     bool lockPosToData() const {return _lockPosToData->isChecked();}
0038     bool lockPosToDataDirty() const;
0039 
0040     void enableSingleEditOptions(bool enabled);
0041     void clearTabValues();
0042 
0043   public Q_SLOTS:
0044     void fillDimensions(bool lock_pos_to_data);
0045 
0046   private:
0047     ViewItem *_viewItem;
0048 
0049   private Q_SLOTS:
0050     void modified();
0051 
0052   Q_SIGNALS:
0053     void tabModified();
0054 };
0055 
0056 }
0057 #endif // CIRCLEDIMENSIONSTAB_H