+ add new custom widget

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5364 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer
2011-12-30 14:30:52 +00:00
parent dfbea1de96
commit db0ad3a49c
5 changed files with 343 additions and 0 deletions

View File

@@ -30,8 +30,46 @@
#include <Gui/propertyeditor/PropertyItem.h>
class QGridLayout;
class QLabel;
class QDoubleSpinBox;
class QComboBox;
namespace Gui {
class LocationWidget : public QWidget
{
Q_OBJECT
public:
LocationWidget (QWidget * parent = 0);
virtual ~LocationWidget();
QSize sizeHint() const;
Base::Vector3f getPosition() const;
void setDirection(const Base::Vector3f& dir);
Base::Vector3f getDirection() const;
Base::Vector3f getUserDirection(bool* ok=0) const;
private Q_SLOTS:
void on_direction_activated(int);
private:
void changeEvent(QEvent*);
void retranslateUi();
private:
QGridLayout *box;
QLabel *xLabel;
QLabel *yLabel;
QLabel *zLabel;
QLabel *dLabel;
QDoubleSpinBox *xValue;
QDoubleSpinBox *yValue;
QDoubleSpinBox *zValue;
QComboBox *dValue;
};
/** This is the base dialog class that defines the interface for
* specifying a direction vector by the user.
* @author Werner Mayer