diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 0212f523c..5a6ea6794 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -227,7 +227,6 @@ set(Gui_MOC_HDRS SelectionView.h SpinBox.h Splashscreen.h - TaskPanelView.h TextEdit.h TextureMapping.h ToolBox.h @@ -527,7 +526,6 @@ SET(Dock_Windows_CPP_SRCS PropertyView.cpp ReportView.cpp SelectionView.cpp - TaskPanelView.cpp ToolBox.cpp Tree.cpp TreeView.cpp @@ -540,7 +538,6 @@ SET(Dock_Windows_HPP_SRCS PropertyView.h ReportView.h SelectionView.h - TaskPanelView.h ToolBox.h Tree.h TreeView.h diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 0106549ca..7ffbe3a77 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -91,7 +91,6 @@ #include "Tree.h" #include "PropertyView.h" #include "SelectionView.h" -#include "TaskPanelView.h" #include "MenuManager.h" //#include "ToolBox.h" #include "HelpView.h" @@ -324,13 +323,6 @@ MainWindow::MainWindow(QWidget * parent, Qt::WFlags f) QString home = Gui::Dialog::DlgOnlineHelpImp::getStartpage(); HelpView* pcHelpView = new HelpView( home, this ); pDockMgr->registerDockWindow("Std_HelpView", pcHelpView); - - // TaskPanel view - TaskPanelView* pcTaskPanelView = new TaskPanelView(0, this); - pcTaskPanelView->setObjectName - (QString::fromAscii(QT_TRANSLATE_NOOP("QDockWidget","Task View"))); - pcTaskPanelView->setMinimumWidth(210); - pDockMgr->registerDockWindow("Std_TaskPanelView", pcTaskPanelView); #endif // Tree view diff --git a/src/Gui/TaskPanelView.cpp b/src/Gui/TaskPanelView.cpp deleted file mode 100644 index bdec98fc4..000000000 --- a/src/Gui/TaskPanelView.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2009 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" - -/// Here the FreeCAD includes sorted by Base,App,Gui...... - -#include "TaskPanelView.h" -#include "BitmapFactory.h" -#include "iisTaskPanel/include/iisTaskPanel" -#include - -using namespace Gui; -using namespace Gui::DockWnd; - - -/* TRANSLATOR Gui::DockWnd::TaskPanelView */ - -TaskPanelView::TaskPanelView(Gui::Document* pcDocument, QWidget *parent) - : DockWindow(pcDocument,parent) -{ -#if QT_VERSION <= 0x040104 - // tmp. disable the file logging to suppress some bothering warnings related - // to Qt 4.1 because it will really pollute the log file with useless stuff - Base::Console().SetEnabledMsgType("File", ConsoleMsgType::MsgType_Wrn, false); - Base::Console().SetEnabledMsgType("File", ConsoleMsgType::MsgType_Log, false); -#endif - - setWindowTitle(tr( "Task View")); - - QGridLayout* gridLayout = new QGridLayout(this); - iisTaskPanel *taskPanel = new iisTaskPanel(this); - iisTaskBox *tb1 = new iisTaskBox( - Gui::BitmapFactory().pixmap("document-new"),QLatin1String("Group of Tasks"),true, this); - taskPanel->addWidget(tb1); - gridLayout->addWidget(taskPanel, 0, 0, 2, 1); - - iisIconLabel *i1 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("zoom-in"), QLatin1String("Do Task 1"), tb1); - tb1->addIconLabel(i1); - //connect(i1, SIGNAL(activated()), this, SLOT(task1())); - - iisIconLabel *i2 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("zoom-out"), QLatin1String("Do Task 2"), tb1); - tb1->addIconLabel(i2); - - QHBoxLayout *hbl = new QHBoxLayout(); - tb1->groupLayout()->addLayout(hbl); - - iisIconLabel *i3 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("edit-copy"), QLatin1String("Do Task 3"), tb1); - tb1->addIconLabel(i3, false); - hbl->addWidget(i3); - - iisIconLabel *i4 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("edit-cut"), QLatin1String("Do Task 4"), tb1); - tb1->addIconLabel(i4, false); - hbl->addWidget(i4); - i4->setColors(Qt::red, Qt::green, Qt::gray); - i4->setFocusPen(QPen()); - - iisIconLabel *i5 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("edit-paste"), QLatin1String("Do Task 5"), tb1); - tb1->addIconLabel(i5); - - iisTaskBox *tb2 = new iisTaskBox( - Gui::BitmapFactory().pixmap("document-print"), QLatin1String("Non-expandable Group"), false, this); - taskPanel->addWidget(tb2); - - iisIconLabel *i21 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-new"), QLatin1String("Do Task 2.1"), tb2); - tb2->addIconLabel(i21); - - iisIconLabel *i22 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-open"), QLatin1String("Do Task 2.2"), tb2); - tb2->addIconLabel(i22); - i22->setEnabled(false); - - iisIconLabel *i23 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-save"), QLatin1String("Do Task 2.3"), tb2); - tb2->addIconLabel(i23); - - iisTaskBox *tb3 = new iisTaskBox(QPixmap(), QLatin1String("Group without Icons"), true, this); - taskPanel->addWidget(tb3); - - iisIconLabel *i31 = new iisIconLabel(QPixmap(), QLatin1String("Do Task 3.1"), tb3); - tb3->addIconLabel(i31); - - iisIconLabel *i32 = new iisIconLabel(QPixmap(), QLatin1String("Do Task 3.2"), tb3); - tb3->addIconLabel(i32); - - tb3->groupLayout()->addWidget(new QLabel(QLatin1String("Widgets also allowed:"), this)); - tb3->groupLayout()->addWidget(new QPushButton(QLatin1String("A Button"), this)); - - // Other widgets can be also added to the panel - QLabel *l1 = new QLabel(QLatin1String("A group without header"), this); - taskPanel->addWidget(l1); - - - iisTaskGroup *tb4 = new iisTaskGroup(this); - taskPanel->addWidget(tb4); - - iisIconLabel *i41 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("application-exit"), QLatin1String("Do Task 4.1"), tb4); - tb4->addIconLabel(i41); - - iisIconLabel *i42 = new iisIconLabel(QPixmap(), QLatin1String("Do Task 4.2"), tb4); - tb4->addIconLabel(i42); - - taskPanel->addStretch(); - taskPanel->setScheme(iisWinXPTaskPanelScheme::defaultScheme()); - //tb1->setScheme(iisWinXPTaskPanelScheme::defaultScheme()); - tb2->setScheme(iisWinXPTaskPanelScheme2::defaultScheme()); - tb3->setScheme(iisWinXPTaskPanelScheme2::defaultScheme()); - //tb4->setScheme(iisWinXPTaskPanelScheme::defaultScheme()); - - onUpdate(); - - Gui::Selection().Attach(this); - -#if QT_VERSION <= 0x040104 - Base::Console().SetEnabledMsgType("File", ConsoleMsgType::MsgType_Wrn, true); - Base::Console().SetEnabledMsgType("File", ConsoleMsgType::MsgType_Log, true); -#endif -} - -TaskPanelView::~TaskPanelView() -{ - Gui::Selection().Detach(this); -} - -/// @cond DOXERR -void TaskPanelView::OnChange(Gui::SelectionSingleton::SubjectType &rCaller, - Gui::SelectionSingleton::MessageType Reason) -{ - /* - std::string temp; - - if (Reason.Type == SelectionChanges::AddSelection) { - } - else if (Reason.Type == SelectionChanges::ClrSelection) { - } - else if (Reason.Type == SelectionChanges::RmvSelection) { - } - */ -} - -void TaskPanelView::onUpdate(void) -{ -} - -bool TaskPanelView::onMsg(const char* pMsg,const char** ppReturn) -{ - return false; -} -/// @endcond - -#include "moc_TaskPanelView.cpp" diff --git a/src/Gui/TaskPanelView.h b/src/Gui/TaskPanelView.h deleted file mode 100644 index 8ac0707b4..000000000 --- a/src/Gui/TaskPanelView.h +++ /dev/null @@ -1,68 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2009 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - - -#ifndef GUI_DOCKWND_TASKPANELVIEW_H -#define GUI_DOCKWND_TASKPANELVIEW_H - -#include "DockWindow.h" -#include "Selection.h" - -namespace Gui { -namespace DockWnd { - -/** A test class. A more elaborate class description. - */ -class TaskPanelView : public Gui::DockWindow, public Gui::SelectionSingleton::ObserverType -{ - Q_OBJECT - -public: - /** - * A constructor. - * A more elaborate description of the constructor. - */ - TaskPanelView(Gui::Document* pcDocument, QWidget *parent=0); - - /** - * A destructor. - * A more elaborate description of the destructor. - */ - virtual ~TaskPanelView(); - - /// Observer message from the Selection - virtual void OnChange(Gui::SelectionSingleton::SubjectType &rCaller, - Gui::SelectionSingleton::MessageType Reason); - - - virtual bool onMsg(const char* pMsg,const char** ppReturn); - virtual const char *getName(void) const {return "TaskPanelView";} - - /// get called when the document is changed or updated - virtual void onUpdate(void); -}; - -} // namespace DockWnd -} // namespace Gui - -#endif // GUI_DOCKWND_SELECTIONVIEW_H diff --git a/src/Gui/Workbench.cpp b/src/Gui/Workbench.cpp index 792a03ab4..589b57a74 100644 --- a/src/Gui/Workbench.cpp +++ b/src/Gui/Workbench.cpp @@ -617,7 +617,6 @@ DockWindowItems* StdWorkbench::setupDockWindows() const root->addDockWidget("Std_SelectionView", Qt::LeftDockWidgetArea, false, false); root->addDockWidget("Std_CombiView", Qt::LeftDockWidgetArea, false, false); root->addDockWidget("Std_ReportView", Qt::BottomDockWidgetArea, true, true); - //root->addDockWidget("Std_TaskPanelView", Qt::RightDockWidgetArea, false, false); root->addDockWidget("Std_PythonView", Qt::BottomDockWidgetArea, true, true); return root; }