TaskAppearance.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2009 Jürgen Riegel <juergen.riegel@web.de>              *
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_TASKAPPERANCE_H
00025 #define GUI_TASKVIEW_TASKAPPERANCE_H
00026 
00027 #include "TaskView.h"
00028 #include <Gui/Selection.h>
00029 #include <boost/signals.hpp>
00030 
00031 
00032 class Ui_TaskAppearance;
00033 
00034 namespace App {
00035 class Property;
00036 }
00037 
00038 namespace Gui {
00039 class ViewProvider;
00040 namespace TaskView {
00041 typedef boost::signals::connection TaskAppearance_Connection;
00042 
00043 class TaskAppearance : public TaskBox, public Gui::SelectionSingleton::ObserverType
00044 {
00045     Q_OBJECT
00046 
00047 public:
00048     TaskAppearance(QWidget *parent = 0);
00049     ~TaskAppearance();
00051     void OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
00052                   Gui::SelectionSingleton::MessageType Reason);
00053 
00054 private Q_SLOTS:
00055     void on_changeMode_activated(const QString&);
00056     void on_changePlot_activated(const QString&);
00057     void on_spinTransparency_valueChanged(int);
00058     void on_spinPointSize_valueChanged(int);
00059     void on_spinLineWidth_valueChanged(int);
00060 
00061 protected:
00062     void changeEvent(QEvent *e);
00063 
00064 private:
00065     void slotChangedObject(const Gui::ViewProvider&, const App::Property& Prop);
00066     void setDisplayModes(const std::vector<Gui::ViewProvider*>&);
00067     void setPointSize(const std::vector<Gui::ViewProvider*>&);
00068     void setLineWidth(const std::vector<Gui::ViewProvider*>&);
00069     void setTransparency(const std::vector<Gui::ViewProvider*>&);
00070     std::vector<Gui::ViewProvider*> getSelection() const;
00071 
00072 private:
00073     QWidget* proxy;
00074     Ui_TaskAppearance* ui;
00075     TaskAppearance_Connection connectChangedObject;
00076 };
00077 
00078 } //namespace TaskView
00079 } //namespace Gui
00080 
00081 #endif // GUI_TASKVIEW_TASKAPPERANCE_H

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