mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Restore add_new_diagram_button
This commit is contained in:
@@ -755,11 +755,12 @@ void ProjectView::initWidgets() {
|
|||||||
#endif
|
#endif
|
||||||
m_tab -> setMovable(true);
|
m_tab -> setMovable(true);
|
||||||
|
|
||||||
|
QHBoxLayout *TopRightCorner_Layout = new QHBoxLayout();
|
||||||
|
|
||||||
QToolButton *add_new_diagram_button = new QToolButton;
|
QToolButton *add_new_diagram_button = new QToolButton;
|
||||||
add_new_diagram_button -> setDefaultAction(m_add_new_diagram);
|
add_new_diagram_button -> setDefaultAction(m_add_new_diagram);
|
||||||
add_new_diagram_button -> setAutoRaise(true);
|
add_new_diagram_button -> setAutoRaise(true);
|
||||||
// @ TODO find a solution to restore this button in a new QHBoxLayout group with the last view button
|
TopRightCorner_Layout->addWidget(add_new_diagram_button);
|
||||||
//m_tab -> setCornerWidget(add_new_diagram_button, Qt::TopRightCorner);
|
|
||||||
|
|
||||||
connect(m_tab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
|
connect(m_tab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
|
||||||
connect(m_tab, SIGNAL(tabBarDoubleClicked(int)), this, SLOT(tabDoubleClicked(int)));
|
connect(m_tab, SIGNAL(tabBarDoubleClicked(int)), this, SLOT(tabDoubleClicked(int)));
|
||||||
@@ -775,7 +776,11 @@ void ProjectView::initWidgets() {
|
|||||||
QToolButton *m_end_view_button =new QToolButton;
|
QToolButton *m_end_view_button =new QToolButton;
|
||||||
m_end_view_button->setDefaultAction(m_end_view);
|
m_end_view_button->setDefaultAction(m_end_view);
|
||||||
m_end_view_button->setAutoRaise(true);
|
m_end_view_button->setAutoRaise(true);
|
||||||
m_tab->setCornerWidget(m_end_view_button, Qt::TopRightCorner);
|
TopRightCorner_Layout->addWidget(m_end_view_button);
|
||||||
|
|
||||||
|
QWidget *tabwidget=new QWidget(this);
|
||||||
|
tabwidget->setLayout(TopRightCorner_Layout);
|
||||||
|
m_tab -> setCornerWidget(tabwidget, Qt::TopRightCorner);
|
||||||
|
|
||||||
fallback_widget_ -> setVisible(false);
|
fallback_widget_ -> setVisible(false);
|
||||||
m_tab -> setVisible(false);
|
m_tab -> setVisible(false);
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class QVBoxLayout;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@brief The ProjectView class
|
||||||
This class provides a widget displaying the diagrams of a particular
|
This class provides a widget displaying the diagrams of a particular
|
||||||
project using tabs.
|
project using tabs.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user