#include "XGUI_MainWindow.h"
+#include "XGUI_Constants.h"
#include "XGUI_MainMenu.h"
#include "XGUI_ViewWindow.h"
#include "XGUI_Viewer.h"
void XGUI_MainWindow::showPropertyPanel()
{
QAction* aViewAct = myPropertyPanelDock->toggleViewAction();
+ //<! Restore ability to close panel from the window's menu
aViewAct->setEnabled(true);
myPropertyPanelDock->show();
myPropertyPanelDock->raise();
void XGUI_MainWindow::hidePropertyPanel()
{
QAction* aViewAct = myPropertyPanelDock->toggleViewAction();
+ //<! Do not allow to show empty property panel
aViewAct->setEnabled(false);
myPropertyPanelDock->hide();
}
{
QDockWidget* aPropPanel = new QDockWidget(this);
aPropPanel->setWindowTitle(tr("Property Panel"));
+ aPropPanel->setObjectName(XGUI::PROP_PANEL);
QWidget* aContent = new QWidget(aPropPanel);
QVBoxLayout* aMainLay = new QVBoxLayout(aContent);
aPropPanel->setWidget(aContent);
QWidget* aCustomWidget = new QWidget(aContent);
- aCustomWidget->setObjectName("property_panel_widget");
+ aCustomWidget->setObjectName(XGUI::PROP_PANEL_WDG);
aMainLay->addWidget(aCustomWidget);
aMainLay->addStretch(1);
aBtnLay->addWidget(aBtn);
aBtnLay->addStretch(1);
aBtn = new QPushButton(QIcon(":pictures/button_ok.png"), "", aFrm);
- aBtn->setObjectName("property_panel_ok");
+ aBtn->setObjectName(XGUI::PROP_PANEL_OK);
aBtn->setFlat(true);
aBtnLay->addWidget(aBtn);
aBtn = new QPushButton(QIcon(":pictures/button_cancel.png"), "", aFrm);
- aBtn->setObjectName("property_panel_cancel");
+ aBtn->setObjectName(XGUI::PROP_PANEL_CANCEL);
aBtn->setFlat(true);
aBtnLay->addWidget(aBtn);