00001 /*************************************************************************** 00002 * Copyright (c) 2009 Werner Mayer <wmayer[at]users.sourceforge.net> * 00003 * * 00004 * This file is part of the FreeCAD CAx development system. * 00005 * * 00006 * This library is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU Library General Public * 00008 * License as published by the Free Software Foundation; either * 00009 * version 2 of the License, or (at your option) any later version. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU Library General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Library General Public * 00017 * License along with this library; see the file COPYING.LIB. If not, * 00018 * write to the Free Software Foundation, Inc., 59 Temple Place, * 00019 * Suite 330, Boston, MA 02111-1307, USA * 00020 * * 00021 ***************************************************************************/ 00022 00023 #ifndef PARTGUI_DLGREVOLUTION_H 00024 #define PARTGUI_DLGREVOLUTION_H 00025 00026 #include <Gui/InputVector.h> 00027 #include <Gui/TaskView/TaskDialog.h> 00028 #include <Gui/TaskView/TaskView.h> 00029 00030 namespace PartGui { 00031 00032 class Ui_DlgRevolution; 00033 class DlgRevolution : public Gui::LocationDialog 00034 { 00035 Q_OBJECT 00036 00037 public: 00038 DlgRevolution(QWidget* parent = 0, Qt::WFlags fl = 0); 00039 ~DlgRevolution(); 00040 void accept(); 00041 00042 Base::Vector3f getDirection() const; 00043 00044 protected: 00045 void changeEvent(QEvent *e); 00046 00047 private: 00048 void findShapes(); 00049 void directionActivated(int); 00050 00051 private: 00052 typedef Gui::LocationInterfaceComp<Ui_DlgRevolution> Ui_RevolutionComp; 00053 Ui_RevolutionComp* ui; 00054 }; 00055 00056 class TaskRevolution : public Gui::TaskView::TaskDialog 00057 { 00058 Q_OBJECT 00059 00060 public: 00061 TaskRevolution(); 00062 ~TaskRevolution(); 00063 00064 public: 00065 bool accept(); 00066 00067 virtual QDialogButtonBox::StandardButtons getStandardButtons() const 00068 { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } 00069 00070 private: 00071 DlgRevolution* widget; 00072 Gui::TaskView::TaskBox* taskbox; 00073 }; 00074 00075 } // namespace PartGui 00076 00077 #endif // PARTGUI_DLGREVOLUTION_H