refs #512, GUI improvements

* menu widget to correct margin
* optimized stylesheet by adding dynamic properties for CDockWidget widgets (allows better qss selection)
This commit is contained in:
Klaus Basan
2016-06-01 23:05:08 +02:00
parent a25a0d1c0c
commit 67512d9d1f
7 changed files with 353 additions and 38 deletions

View File

@@ -0,0 +1,59 @@
/* Copyright (C) 2016
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_COMPONENTS_MARGINSINPUT_H
#define BLACKGUI_COMPONENTS_MARGINSINPUT_H
#include <QFrame>
#include <QMargins>
#include <QScopedPointer>
namespace Ui { class CMarginsInput; }
namespace BlackGui
{
namespace Components
{
/*!
* Widget alows to enter margins
*/
class CMarginsInput : public QFrame
{
Q_OBJECT
public:
//! Constructor
explicit CMarginsInput(QWidget *parent = nullptr);
//! Destructor
~CMarginsInput();
//! Set margins
void setMargins(const QMargins &margins);
//! Current values of margins
QMargins getMargins() const;
signals:
//! Margins changed
void changedMargins(const QMargins &margins);
private slots:
//! Ok
void ps_Confirmed();
private:
QScopedPointer<Ui::CMarginsInput> ui;
};
} // ns
} // ns
#endif // guard