refs #829, ui for model settings

This commit is contained in:
Klaus Basan
2016-12-10 01:28:51 +01:00
parent d4ca4bb0f1
commit fcb8df92b1
4 changed files with 199 additions and 32 deletions

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>407</height>
<height>443</height>
</rect>
</property>
<property name="minimumSize">
@@ -32,7 +32,7 @@
<property name="bottomMargin">
<number>4</number>
</property>
<item row="1" column="4">
<item row="2" column="4">
<widget class="QGroupBox" name="gb_DistributorPreferences">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -75,19 +75,44 @@
</layout>
</widget>
</item>
<item row="0" column="4">
<widget class="QGroupBox" name="gb_Simulator">
<item row="2" column="0">
<widget class="QGroupBox" name="gb_SwiftDb">
<property name="title">
<string>Simulator</string>
<string>swift DB</string>
</property>
<layout class="QVBoxLayout" name="vl_Simulator">
<item>
<widget class="BlackGui::Components::CSettingsSimulatorBasicsComponent" name="comp_SimulatorComponent">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<layout class="QGridLayout" name="gl_SwiftDB">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item row="1" column="0">
<spacer name="vs_SwiftDb">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="BlackGui::Components::CDbLoginComponent" name="comp_LoginComponent">
<property name="minimumSize">
<size>
<width>0</width>
<height>175</height>
</size>
</property>
</widget>
</item>
@@ -145,31 +170,61 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="gb_SwiftDb">
<widget class="QGroupBox" name="gb_Models">
<property name="title">
<string>swift DB</string>
<string>Models</string>
</property>
<layout class="QGridLayout" name="gl_SwiftDB">
<item row="1" column="0">
<spacer name="vs_SwiftDb">
<property name="orientation">
<enum>Qt::Vertical</enum>
<layout class="QVBoxLayout" name="vl_ModelSettings">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="BlackGui::Components::CSettingsModelComponent" name="comp_ModelSettings">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</spacer>
</widget>
</item>
<item row="0" column="0">
<widget class="BlackGui::Components::CDbLoginComponent" name="comp_LoginComponent">
<property name="minimumSize">
<size>
<width>0</width>
<height>175</height>
</size>
</layout>
</widget>
</item>
<item row="0" column="4" rowspan="2">
<widget class="QGroupBox" name="gb_Simulator">
<property name="title">
<string>Simulator</string>
</property>
<layout class="QVBoxLayout" name="vl_Simulator">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="BlackGui::Components::CSettingsSimulatorBasicsComponent" name="comp_SimulatorComponent">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
@@ -203,6 +258,12 @@
<header>blackgui/components/settingsguicomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CSettingsModelComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/settingsmodelcomponent.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>

View File

@@ -0,0 +1,27 @@
/* 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.
*/
#include "settingsmodelcomponent.h"
#include "ui_settingsmodelcomponent.h"
namespace BlackGui
{
namespace Components
{
CSettingsModelComponent::CSettingsModelComponent(QWidget *parent) :
QFrame(parent),
ui(new Ui::CSettingsModelComponent)
{
ui->setupUi(this);
}
CSettingsModelComponent::~CSettingsModelComponent()
{ }
} // ns
} // ns

View File

@@ -0,0 +1,42 @@
/* 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_SETTINGSMODELCOMPONENT_H
#define BLACKGUI_COMPONENTS_SETTINGSMODELCOMPONENT_H
#include <QFrame>
namespace Ui { class CSettingsModelComponent; }
namespace BlackGui
{
namespace Components
{
/*!
* Settings UI for model matching/mapping
*/
class CSettingsModelComponent : public QFrame
{
Q_OBJECT
public:
//! Constructor
explicit CSettingsModelComponent(QWidget *parent = nullptr);
//! Destructor
virtual ~CSettingsModelComponent();
private:
QScopedPointer<Ui::CSettingsModelComponent> ui;
};
} // ns
} // ns
#endif // guard

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CSettingsModelComponent</class>
<widget class="QFrame" name="CSettingsModelComponent">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>187</width>
<height>40</height>
</rect>
</property>
<property name="windowTitle">
<string>Frame</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="cb_AllowExcludeModels">
<property name="toolTip">
<string>Hint: This can cause wrong behaviour or violate 3rd parties copyright. You need to know what you are doing enabling the feature.</string>
</property>
<property name="text">
<string>allow &quot;exclude&quot; models in set</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>