TaskPadParameters.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.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 
00024 #ifndef GUI_TASKVIEW_TaskPadParameters_H
00025 #define GUI_TASKVIEW_TaskPadParameters_H
00026 
00027 #include <Gui/TaskView/TaskView.h>
00028 #include <Gui/Selection.h>
00029 #include <Gui/TaskView/TaskDialog.h>
00030 
00031 #include "ViewProviderPad.h"
00032 
00033 class Ui_TaskPadParameters;
00034 
00035 namespace App {
00036 class Property;
00037 }
00038 
00039 namespace Gui {
00040 class ViewProvider;
00041 }
00042 
00043 namespace PartDesignGui { 
00044 
00045 
00046 
00047 class TaskPadParameters : public Gui::TaskView::TaskBox
00048 {
00049     Q_OBJECT
00050 
00051 public:
00052     TaskPadParameters(ViewProviderPad *PadView,QWidget *parent = 0);
00053     ~TaskPadParameters();
00054 
00055     double getLength(void) const;
00056     bool   getReversed(void) const;
00057     bool   getMirroredExtent(void) const;
00058 
00059 private Q_SLOTS:
00060     void onLengthChanged(double);
00061     void onMirrored(bool);
00062     void onReversed(bool);
00063 
00064 protected:
00065     void changeEvent(QEvent *e);
00066 
00067 private:
00068 
00069 private:
00070     QWidget* proxy;
00071     Ui_TaskPadParameters* ui;
00072     ViewProviderPad *PadView;
00073 };
00074 
00076 class TaskDlgPadParameters : public Gui::TaskView::TaskDialog
00077 {
00078     Q_OBJECT
00079 
00080 public:
00081     TaskDlgPadParameters(ViewProviderPad *PadView);
00082     ~TaskDlgPadParameters();
00083 
00084     ViewProviderPad* getPadView() const
00085     { return PadView; }
00086 
00087 
00088 public:
00090     virtual void open();
00092     virtual void clicked(int);
00094     virtual bool accept();
00096     virtual bool reject();
00098     virtual bool isAllowedAlterDocument(void) const
00099     { return false; }
00100 
00102     virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const
00103     { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; }
00104 
00105 protected:
00106     ViewProviderPad   *PadView;
00107 
00108     TaskPadParameters  *parameter;
00109 };
00110 
00111 } //namespace PartDesignGui
00112 
00113 #endif // GUI_TASKVIEW_TASKAPPERANCE_H

Generated on Wed Nov 23 19:00:43 2011 for FreeCAD by  doxygen 1.6.1