Gui: fix naming inconsistency and rename 'combi' to 'combo'
This commit is contained in:
@@ -280,7 +280,7 @@ set(Gui_MOC_HDRS
|
||||
Assistant.h
|
||||
AutoSaver.h
|
||||
CallTips.h
|
||||
CombiView.h
|
||||
ComboView.h
|
||||
Control.h
|
||||
Clipping.h
|
||||
DemoMode.h
|
||||
@@ -701,7 +701,7 @@ SOURCE_GROUP("Dialog\\Settings" FILES ${Dialog_Settings_SRCS})
|
||||
|
||||
# The dock windows sources
|
||||
SET(Dock_Windows_CPP_SRCS
|
||||
CombiView.cpp
|
||||
ComboView.cpp
|
||||
DockWindow.cpp
|
||||
PropertyView.cpp
|
||||
ReportView.cpp
|
||||
@@ -717,7 +717,7 @@ SET(Dock_Windows_CPP_SRCS
|
||||
DAGView/DAGFilter.cpp
|
||||
)
|
||||
SET(Dock_Windows_HPP_SRCS
|
||||
CombiView.h
|
||||
ComboView.h
|
||||
DockWindow.h
|
||||
PropertyView.h
|
||||
ReportView.h
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||
|
||||
#include "CombiView.h"
|
||||
#include "ComboView.h"
|
||||
#include "BitmapFactory.h"
|
||||
#include "PropertyView.h"
|
||||
#include "ProjectView.h"
|
||||
@@ -42,12 +42,12 @@ using namespace Gui;
|
||||
using namespace Gui::DockWnd;
|
||||
|
||||
|
||||
/* TRANSLATOR Gui::DockWnd::CombiView */
|
||||
/* TRANSLATOR Gui::DockWnd::ComboView */
|
||||
|
||||
CombiView::CombiView(Gui::Document* pcDocument, QWidget *parent)
|
||||
ComboView::ComboView(Gui::Document* pcDocument, QWidget *parent)
|
||||
: DockWindow(pcDocument,parent), oldTabIndex(0)
|
||||
{
|
||||
setWindowTitle(tr("CombiView"));
|
||||
setWindowTitle(tr("Combo View"));
|
||||
|
||||
QGridLayout* pLayout = new QGridLayout(this);
|
||||
pLayout->setSpacing( 0 );
|
||||
@@ -80,11 +80,11 @@ CombiView::CombiView(Gui::Document* pcDocument, QWidget *parent)
|
||||
//tabs->addTab(projectView, trUtf8("Project"));
|
||||
}
|
||||
|
||||
CombiView::~CombiView()
|
||||
ComboView::~ComboView()
|
||||
{
|
||||
}
|
||||
|
||||
void CombiView::showDialog(Gui::TaskView::TaskDialog *dlg)
|
||||
void ComboView::showDialog(Gui::TaskView::TaskDialog *dlg)
|
||||
{
|
||||
static QIcon icon = Gui::BitmapFactory().pixmap("edit-edit.svg");
|
||||
|
||||
@@ -96,13 +96,13 @@ void CombiView::showDialog(Gui::TaskView::TaskDialog *dlg)
|
||||
taskPanel->showDialog(dlg);
|
||||
}
|
||||
|
||||
void CombiView::closeDialog()
|
||||
void ComboView::closeDialog()
|
||||
{
|
||||
// close the dialog
|
||||
taskPanel->removeDialog();
|
||||
}
|
||||
|
||||
void CombiView::closedDialog()
|
||||
void ComboView::closedDialog()
|
||||
{
|
||||
static QIcon icon = QIcon();
|
||||
|
||||
@@ -111,19 +111,19 @@ void CombiView::closedDialog()
|
||||
tabs->setTabIcon(1, icon);
|
||||
}
|
||||
|
||||
void CombiView::showTreeView()
|
||||
void ComboView::showTreeView()
|
||||
{
|
||||
// switch to the tree view
|
||||
tabs->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void CombiView::showTaskView()
|
||||
void ComboView::showTaskView()
|
||||
{
|
||||
// switch to the task view
|
||||
tabs->setCurrentIndex(1);
|
||||
}
|
||||
|
||||
void CombiView::changeEvent(QEvent *e)
|
||||
void ComboView::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
tabs->setTabText(0, trUtf8("Model"));
|
||||
@@ -135,4 +135,4 @@ void CombiView::changeEvent(QEvent *e)
|
||||
}
|
||||
|
||||
|
||||
#include "moc_CombiView.cpp"
|
||||
#include "moc_ComboView.cpp"
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
|
||||
|
||||
#ifndef GUI_DOCKWND_COMBIVIEW_H
|
||||
#define GUI_DOCKWND_COMBIVIEW_H
|
||||
#ifndef GUI_DOCKWND_COMBOVIEW_H
|
||||
#define GUI_DOCKWND_COMBOVIEW_H
|
||||
|
||||
#include "DockWindow.h"
|
||||
#include "Selection.h"
|
||||
@@ -57,11 +57,11 @@ namespace Gui {
|
||||
class ControlSingleton;
|
||||
namespace DockWnd {
|
||||
|
||||
/** Combi View
|
||||
/** Combo View
|
||||
* is a combination of a tree, property and TaskPanel for
|
||||
* integrated user action.
|
||||
*/
|
||||
class GuiExport CombiView : public Gui::DockWindow
|
||||
class GuiExport ComboView : public Gui::DockWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -70,13 +70,13 @@ public:
|
||||
* A constructor.
|
||||
* A more elaborate description of the constructor.
|
||||
*/
|
||||
CombiView(Gui::Document* pcDocument, QWidget *parent=0);
|
||||
ComboView(Gui::Document* pcDocument, QWidget *parent=0);
|
||||
|
||||
/**
|
||||
* A destructor.
|
||||
* A more elaborate description of the destructor.
|
||||
*/
|
||||
virtual ~CombiView();
|
||||
virtual ~ComboView();
|
||||
|
||||
Gui::TaskView::TaskView *getTaskPanel(void){return taskPanel;}
|
||||
QTabWidget* getTabPanel() const { return tabs;}
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "TaskView/TaskView.h"
|
||||
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/CombiView.h>
|
||||
#include <Gui/ComboView.h>
|
||||
#include <Gui/DockWindowManager.h>
|
||||
|
||||
|
||||
@@ -61,11 +61,11 @@ ControlSingleton::~ControlSingleton()
|
||||
|
||||
Gui::TaskView::TaskView* ControlSingleton::taskPanel() const
|
||||
{
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
// should return the pointer to combo view
|
||||
if (pcCombiView)
|
||||
return pcCombiView->getTaskPanel();
|
||||
if (pcComboView)
|
||||
return pcComboView->getTaskPanel();
|
||||
// not all workbenches have the combo view enabled
|
||||
else if (_taskPanel)
|
||||
return _taskPanel;
|
||||
@@ -76,20 +76,20 @@ Gui::TaskView::TaskView* ControlSingleton::taskPanel() const
|
||||
|
||||
void ControlSingleton::showTaskView()
|
||||
{
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
if (pcCombiView)
|
||||
pcCombiView->showTaskView();
|
||||
if (pcComboView)
|
||||
pcComboView->showTaskView();
|
||||
else if (_taskPanel)
|
||||
_taskPanel->raise();
|
||||
}
|
||||
|
||||
void ControlSingleton::showModelView()
|
||||
{
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
if (pcCombiView)
|
||||
pcCombiView->showTreeView();
|
||||
if (pcComboView)
|
||||
pcComboView->showTreeView();
|
||||
else if (_taskPanel)
|
||||
_taskPanel->raise();
|
||||
}
|
||||
@@ -108,13 +108,13 @@ void ControlSingleton::showDialog(Gui::TaskView::TaskDialog *dlg)
|
||||
}
|
||||
return;
|
||||
}
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
// should return the pointer to combo view
|
||||
if (pcCombiView) {
|
||||
pcCombiView->showDialog(dlg);
|
||||
if (pcComboView) {
|
||||
pcComboView->showDialog(dlg);
|
||||
// make sure that the combo view is shown
|
||||
QDockWidget* dw = qobject_cast<QDockWidget*>(pcCombiView->parentWidget());
|
||||
QDockWidget* dw = qobject_cast<QDockWidget*>(pcComboView->parentWidget());
|
||||
if (dw) {
|
||||
dw->setVisible(true);
|
||||
dw->toggleViewAction()->setVisible(true);
|
||||
@@ -151,11 +151,11 @@ void ControlSingleton::showDialog(Gui::TaskView::TaskDialog *dlg)
|
||||
|
||||
QTabWidget* ControlSingleton::tabPanel() const
|
||||
{
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
// should return the pointer to combo view
|
||||
if (pcCombiView)
|
||||
return pcCombiView->getTabPanel();
|
||||
if (pcComboView)
|
||||
return pcComboView->getTabPanel();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -167,10 +167,10 @@ Gui::TaskView::TaskDialog* ControlSingleton::activeDialog() const
|
||||
Gui::TaskView::TaskView* ControlSingleton::getTaskPanel()
|
||||
{
|
||||
// should return the pointer to combo view
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
if (pcCombiView)
|
||||
return pcCombiView->getTaskPanel();
|
||||
if (pcComboView)
|
||||
return pcComboView->getTaskPanel();
|
||||
else
|
||||
return _taskPanel;
|
||||
}
|
||||
@@ -197,11 +197,11 @@ void ControlSingleton::reject()
|
||||
|
||||
void ControlSingleton::closeDialog()
|
||||
{
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
// should return the pointer to combo view
|
||||
if (pcCombiView)
|
||||
pcCombiView->closeDialog();
|
||||
if (pcComboView)
|
||||
pcComboView->closeDialog();
|
||||
else if (_taskPanel)
|
||||
_taskPanel->removeDialog();
|
||||
}
|
||||
@@ -209,13 +209,13 @@ void ControlSingleton::closeDialog()
|
||||
void ControlSingleton::closedDialog()
|
||||
{
|
||||
ActiveDialog = 0;
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
Gui::DockWnd::ComboView* pcComboView = qobject_cast<Gui::DockWnd::ComboView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
// should return the pointer to combo view
|
||||
assert(pcCombiView);
|
||||
pcCombiView->closedDialog();
|
||||
assert(pcComboView);
|
||||
pcComboView->closedDialog();
|
||||
// make sure that the combo view is shown
|
||||
QDockWidget* dw = qobject_cast<QDockWidget*>(pcCombiView->parentWidget());
|
||||
QDockWidget* dw = qobject_cast<QDockWidget*>(pcComboView->parentWidget());
|
||||
if (dw)
|
||||
dw->setFeatures(QDockWidget::AllDockWidgetFeatures);
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ void DockWindowManager::retranslate()
|
||||
* \li Std_PropertyView
|
||||
* \li Std_ReportView
|
||||
* \li Std_ToolBox
|
||||
* \li Std_CombiView
|
||||
* \li Std_ComboView
|
||||
* \li Std_SelectionView
|
||||
*
|
||||
* To avoid name clashes the caller should use names of the form \a module_widgettype, i. e. if a analyse dialog for
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
#include "MenuManager.h"
|
||||
//#include "ToolBox.h"
|
||||
#include "ReportView.h"
|
||||
#include "CombiView.h"
|
||||
#include "ComboView.h"
|
||||
#include "PythonConsole.h"
|
||||
#include "TaskView/TaskView.h"
|
||||
#include "DAGView/DAGView.h"
|
||||
@@ -387,7 +387,7 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("DockWindows")->GetGroup("TreeView");
|
||||
bool enabled = group->GetBool("Enabled", true);
|
||||
if(enabled != group->GetBool("Enabled", false)) {
|
||||
if (enabled != group->GetBool("Enabled", false)) {
|
||||
enabled = App::GetApplication().GetUserParameter().GetGroup("BaseApp")
|
||||
->GetGroup("MainWindow")->GetGroup("DockWindows")->GetBool("Std_TreeView",false);
|
||||
}
|
||||
@@ -408,7 +408,7 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("DockWindows")->GetGroup("PropertyView");
|
||||
bool enabled = group->GetBool("Enabled", true);
|
||||
if(enabled != group->GetBool("Enabled", false)) {
|
||||
if (enabled != group->GetBool("Enabled", false)) {
|
||||
enabled = App::GetApplication().GetUserParameter().GetGroup("BaseApp")
|
||||
->GetGroup("MainWindow")->GetGroup("DockWindows")->GetBool("Std_PropertyView",false);
|
||||
}
|
||||
@@ -433,18 +433,19 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
|
||||
}
|
||||
|
||||
// Combo view
|
||||
if (hiddenDockWindows.find("Std_CombiView") == std::string::npos) {
|
||||
if (hiddenDockWindows.find("Std_ComboView") == std::string::npos) {
|
||||
bool enable = !treeView || !propertyView;
|
||||
if(!enable) {
|
||||
if (!enable) {
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("DockWindows")->GetGroup("ComboView");
|
||||
enable = group->GetBool("Enabled", true);
|
||||
}
|
||||
if(enable) {
|
||||
CombiView* pcCombiView = new CombiView(0, this);
|
||||
pcCombiView->setObjectName(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Combo View")));
|
||||
pcCombiView->setMinimumWidth(150);
|
||||
pDockMgr->registerDockWindow("Std_CombiView", pcCombiView);
|
||||
|
||||
if (enable) {
|
||||
ComboView* pcComboView = new ComboView(0, this);
|
||||
pcComboView->setObjectName(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Combo View")));
|
||||
pcComboView->setMinimumWidth(150);
|
||||
pDockMgr->registerDockWindow("Std_ComboView", pcComboView);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class Property;
|
||||
namespace Gui {
|
||||
class ControlSingleton;
|
||||
namespace DockWnd{
|
||||
class CombiView;
|
||||
class ComboView;
|
||||
}
|
||||
namespace TaskView {
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
virtual void OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
|
||||
Gui::SelectionSingleton::MessageType Reason);
|
||||
|
||||
friend class Gui::DockWnd::CombiView;
|
||||
friend class Gui::DockWnd::ComboView;
|
||||
friend class Gui::ControlSingleton;
|
||||
|
||||
void addTaskWatcher(const std::vector<TaskWatcher*> &Watcher);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "Window.h"
|
||||
#include "Selection.h"
|
||||
#include "MainWindow.h"
|
||||
#include <Gui/CombiView.h>
|
||||
#include <Gui/ComboView.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#include <Gui/TaskView/TaskWatcher.h>
|
||||
|
||||
@@ -704,7 +704,7 @@ DockWindowItems* StdWorkbench::setupDockWindows() const
|
||||
root->addDockWidget("Std_TreeView", Qt::LeftDockWidgetArea, true, false);
|
||||
root->addDockWidget("Std_PropertyView", Qt::LeftDockWidgetArea, true, false);
|
||||
root->addDockWidget("Std_SelectionView", Qt::LeftDockWidgetArea, false, false);
|
||||
root->addDockWidget("Std_CombiView", Qt::LeftDockWidgetArea, false, false);
|
||||
root->addDockWidget("Std_ComboView", Qt::LeftDockWidgetArea, false, false);
|
||||
root->addDockWidget("Std_ReportView", Qt::BottomDockWidgetArea, true, true);
|
||||
root->addDockWidget("Std_PythonView", Qt::BottomDockWidgetArea, true, true);
|
||||
|
||||
|
||||
@@ -168,6 +168,6 @@ Gui::DockWindowItems* StartGui::Workbench::setupDockWindows() const
|
||||
{
|
||||
Gui::DockWindowItems* root = Gui::StdWorkbench::setupDockWindows();
|
||||
root->setVisibility(false); // hide all dock windows by default
|
||||
root->setVisibility("Std_CombiView",true); // except of the combi view
|
||||
root->setVisibility("Std_ComboView",true); // except of the combo view
|
||||
return root;
|
||||
}
|
||||
|
||||
@@ -351,6 +351,6 @@ Gui::DockWindowItems* Workbench::setupDockWindows() const
|
||||
{
|
||||
Gui::DockWindowItems* root = Gui::StdWorkbench::setupDockWindows();
|
||||
//root->setVisibility(false); // hide all dock windows by default
|
||||
//root->setVisibility("Std_CombiView",true); // except of the combi view
|
||||
//root->setVisibility("Std_ComboView",true); // except of the combo view
|
||||
return root;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user