FreeCAD
1/***************************************************************************
2* Copyright (c) 2009 Jürgen Riegel <juergen.riegel@web.de> *
3* *
4* This file is part of the FreeCAD CAx development system. *
5* *
6* This library is free software; you can redistribute it and/or *
7* modify it under the terms of the GNU Library General Public *
8* License as published by the Free Software Foundation; either *
9* version 2 of the License, or (at your option) any later version. *
10* *
11* This library is distributed in the hope that it will be useful, *
12* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14* GNU Library General Public License for more details. *
15* *
16* You should have received a copy of the GNU Library General Public *
17* License along with this library; see the file COPYING.LIB. If not, *
18* write to the Free Software Foundation, Inc., 59 Temple Place, *
19* Suite 330, Boston, MA 02111-1307, USA *
20* *
21***************************************************************************/
22
23#include "PreCompiled.h"24#ifndef _PreComp_25#include <QEvent>26#endif27
28#include <Gui/BitmapFactory.h>29
30#include "TaskSketcherCreateCommands.h"31
32
33using namespace Gui::TaskView;34
35TaskSketcherCreateCommands::TaskSketcherCreateCommands(QWidget* parent)36: TaskBox(Gui::BitmapFactory().pixmap("document-new"), tr("Appearance"), true, parent)37{
38// we need a separate container widget to add all controls to39// proxy = new QWidget(this);40// ui = new Ui_TaskAppearance();41// ui->setupUi(proxy);42// ui->textLabel1_3->hide();43// ui->changePlot->hide();44// QMetaObject::connectSlotsByName(this);45
46// this->groupLayout()->addWidget(proxy);47
48// std::vector<Gui::ViewProvider*> views;49// setDisplayModes(views);50// setPointSize(views);51// setLineWidth(views);52// setTransparency(views);53Gui::Selection().Attach(this);54}
55
56TaskSketcherCreateCommands::~TaskSketcherCreateCommands()57{
58// delete ui;59Gui::Selection().Detach(this);60}
61
62void TaskSketcherCreateCommands::changeEvent(QEvent* e)63{
64TaskBox::changeEvent(e);65// if (e->type() == QEvent::LanguageChange) {66// ui->retranslateUi(proxy);67// }68}
69
70/// @cond DOXERR
71void TaskSketcherCreateCommands::OnChange(Gui::SelectionSingleton::SubjectType& rCaller,72Gui::SelectionSingleton::MessageType Reason)73{
74Q_UNUSED(rCaller);75if (Reason.Type == SelectionChanges::AddSelection76|| Reason.Type == SelectionChanges::RmvSelection77|| Reason.Type == SelectionChanges::SetSelection78|| Reason.Type == SelectionChanges::ClrSelection) {}79}
80/// @endcond DOXERR
81
82
83#include "moc_TaskSketcherCreateCommands.cpp"84