Commit 3c57b008 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Keep title setting of diagram and stereotypes window in sync with objects dock window.

parent 11f02609
......@@ -25,8 +25,8 @@
#include <QSortFilterProxyModel>
#include <QtDebug>
DiagramsWindow::DiagramsWindow(QWidget *parent)
: QDockWidget(i18n("&Diagrams"), parent)
DiagramsWindow::DiagramsWindow(const QString &title, QWidget *parent)
: QDockWidget(title, parent)
{
setObjectName(QLatin1String("DiagramsWindow"));
......
......@@ -20,7 +20,7 @@ class DiagramsWindow : public QDockWidget
{
Q_OBJECT
public:
explicit DiagramsWindow(QWidget *parent = 0);
explicit DiagramsWindow(const QString &title, QWidget *parent = 0);
~DiagramsWindow();
signals:
......
......@@ -25,8 +25,8 @@
#include <QSortFilterProxyModel>
#include <QtDebug>
StereotypesWindow::StereotypesWindow(QWidget *parent)
: QDockWidget(i18n("&Stereotypes"), parent)
StereotypesWindow::StereotypesWindow(const QString &title, QWidget *parent)
: QDockWidget(title, parent)
{
setObjectName(QLatin1String("StereotypesWindow"));
......
......@@ -20,7 +20,7 @@ class StereotypesWindow : public QDockWidget
{
Q_OBJECT
public:
explicit StereotypesWindow(QWidget *parent = 0);
explicit StereotypesWindow(const QString &title, QWidget *parent = 0);
~StereotypesWindow();
signals:
......
......@@ -120,11 +120,10 @@ public slots:
void createDiagramsWindow()
{
// create the tree viewer
diagramsWindow = new DiagramsWindow(parent);
diagramsWindow = new DiagramsWindow(i18n("&Diagrams"), parent);
parent->addDockWidget(Qt::LeftDockWidgetArea, diagramsWindow);
viewDiagramsWindow = parent->actionCollection()->add<KToggleAction>(QLatin1String("view_diagrams_window"));
viewDiagramsWindow->setText(i18n("Diagrams"));
connect(viewDiagramsWindow, SIGNAL(triggered(bool)), diagramsWindow, SLOT(setVisible(bool)));
}
......@@ -141,11 +140,10 @@ public slots:
void createStereotypesWindow()
{
// create the tree viewer
stereotypesWindow = new StereotypesWindow(parent);
stereotypesWindow = new StereotypesWindow(i18n("&Stereotypes"), parent);
parent->addDockWidget(Qt::LeftDockWidgetArea, stereotypesWindow);
viewStereotypesWindow = parent->actionCollection()->add<KToggleAction>(QLatin1String("view_stereotypes_window"));
viewStereotypesWindow->setText(i18n("Stereotypes"));
connect(viewStereotypesWindow, SIGNAL(triggered(bool)), stereotypesWindow, SLOT(setVisible(bool)));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment