Skip to content
Snippets Groups Projects
Commit f3d17027 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Merge branch 'FancyMainWindow' into RealSpaceDock

# Conflicts:
#	GUI/coregui/Views/SampleDesigner/ScriptPanel.cpp
parents 17a81074 ccc41189
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ FitActivityPanel::FitActivityPanel(JobModel *jobModel, QWidget *parent)
, m_fitSessionManager(new FitSessionManager(this))
{
setWindowTitle(Constants::JobFitPanelName);
setObjectName("FitActivityPanel");
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
auto mainLayout = new QVBoxLayout;
......
......@@ -24,6 +24,7 @@ JobMessagePanel::JobMessagePanel(QWidget *parent)
, m_plainLog(new QTextEdit)
{
setWindowTitle(Constants::JobMessagePanelName);
setObjectName("JobMessagePanel");
m_plainLog->setReadOnly(true);
// m_plainLog->setMaximumBlockCount(100000);
......
......@@ -29,6 +29,7 @@ JobOutputDataWidget::JobOutputDataWidget(JobModel *jobModel, QWidget *parent)
, m_stackedWidget(new ItemStackPresenter<JobResultsPresenter>(reuse_widget))
{
setWindowTitle(QLatin1String("Job OutputData"));
setObjectName("JobOutputDataWidget");
setMinimumSize(400, 400);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
......
......@@ -28,6 +28,7 @@ JobRealTimeWidget::JobRealTimeWidget(JobModel* jobModel, QWidget* parent)
, m_stackedWidget(new ItemStackPresenter<ParameterTuningWidget>(reuse_widget))
{
setWindowTitle(Constants::JobRealTimeWidgetName);
setObjectName("JobRealTimeWidget");
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
auto mainLayout = new QVBoxLayout;
......
......@@ -33,11 +33,13 @@ JobSelectorWidget::JobSelectorWidget(JobModel* jobModel, QWidget* parent)
, m_jobProperties(new JobPropertiesWidget)
, m_jobModel(nullptr)
{
setModel(jobModel);
setWindowTitle(Constants::JobSelectorWidgetName);
setObjectName("JobSelectorWidget");
setMinimumSize(128, 600);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
setWindowTitle(Constants::JobSelectorWidgetName);
setModel(jobModel);
m_splitter->setOrientation(Qt::Vertical);
m_splitter->addWidget(m_jobListWidget);
......
......@@ -26,7 +26,8 @@ SampleTreeWidget::SampleTreeWidget(QWidget* parent, SampleModel* model)
, m_treeView(new ItemTreeView)
, m_sampleModel(model)
{
setWindowTitle(QString("Sample Tree View"));
setWindowTitle(QString("Sample Tree"));
setObjectName(QLatin1String("SampleTreeWidget"));
auto mainLayout = new QVBoxLayout;
mainLayout->setMargin(0);
......
......@@ -27,6 +27,8 @@ SampleWidgetBox::SampleWidgetBox(SampleDesignerInterface *core, QWidget *parent)
, m_core(core)
, m_widgetBox(0)
{
setWindowTitle(QLatin1String("Widget Box"));
setObjectName(QLatin1String("WidgetBox"));
//Manhattan::StyledBar *bar = new Manhattan::StyledBar(this);
setWindowTitle("Items Toolbox");
......@@ -34,9 +36,6 @@ SampleWidgetBox::SampleWidgetBox(SampleDesignerInterface *core, QWidget *parent)
m_widgetBox = new qdesigner_internal::WidgetBox(m_core, this);
m_widgetBox->setFileName(QStringLiteral(":/widgetbox/widgetbox.xml"));
m_widgetBox->load();
m_widgetBox->setWindowTitle(QLatin1String("Widget Box"));
m_widgetBox->setObjectName(QLatin1String("WidgetBox"));
QVBoxLayout *layout = new QVBoxLayout;
layout->setMargin(0);
......
......@@ -21,7 +21,8 @@ ScriptPanel::ScriptPanel(QWidget *parent)
: InfoPanel(parent)
, m_pySampleWidget(new PySampleWidget(this))
{
setWindowTitle("Python Script View");
setWindowTitle("Python Script");
setObjectName("ScriptPanel");
m_stackedWidget->addWidget(m_pySampleWidget);
......
This diff is collapsed.
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
......@@ -9,21 +9,17 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
......@@ -47,16 +43,15 @@ class QTMANHATTANSTYLESHARED_EXPORT FancyMainWindow : public QMainWindow
Q_OBJECT
public:
explicit FancyMainWindow(QWidget *parent = 0);
virtual ~FancyMainWindow();
explicit FancyMainWindow(QWidget *parent = nullptr);
~FancyMainWindow() override;
/* The widget passed in should have an objectname set
* which will then be used as key for QSettings. */
QDockWidget *addDockForWidget(QWidget *widget);
QList<QDockWidget *> dockWidgets() const;
QDockWidget *addDockForWidget(QWidget *widget, bool immutable = false);
const QList<QDockWidget *> dockWidgets() const;
void setTrackingEnabled(bool enabled);
bool isLocked() const;
void saveSettings(QSettings *settings) const;
void restoreSettings(const QSettings *settings);
......@@ -65,16 +60,15 @@ public:
// Additional context menu actions
QAction *menuSeparator1() const;
QAction *toggleLockedAction() const;
QAction *autoHideTitleBarsAction() const;
QAction *menuSeparator2() const;
QAction *resetLayoutAction() const;
QAction *showCentralWidgetAction() const;
void addDockActionsToMenu(QMenu *menu);
// Overwritten to add locked/reset.
virtual QMenu *createPopupMenu();
bool autoHideTitleBars() const;
QDockWidget *toolBarDockWidget() const;
void setToolBarDockWidget(QDockWidget *dock);
QMenu *createPopupMenu() override;
signals:
// Emitted by resetLayoutAction(). Connect to a slot
......@@ -82,25 +76,21 @@ signals:
void resetLayout();
public slots:
void setLocked(bool locked);
void setDockActionsVisible(bool v);
protected:
void hideEvent(QHideEvent *event);
void showEvent(QShowEvent *event);
void contextMenuEvent(QContextMenuEvent *event);
private slots:
void onDockActionTriggered();
void onDockVisibilityChange(bool);
void onTopLevelChanged();
void hideEvent(QHideEvent *event) override;
void showEvent(QShowEvent *event) override;
void contextMenuEvent(QContextMenuEvent *event) override;
private:
void updateDockWidget(QDockWidget *dockWidget);
void onDockActionTriggered();
void handleVisibilityChanged(bool visible);
FancyMainWindowPrivate *d;
};
} // namespace Manhattan
} // namespace Utils
#endif // FANCYMAINWINDOW_H
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment