Ref T717, initial UI components for model browser

This commit is contained in:
Klaus Basan
2019-08-24 20:18:42 +02:00
committed by Mat Sutcliffe
parent c9d5a18421
commit 1409dae355
10 changed files with 259 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
/* Copyright (C) 2019
* 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. 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 "modelbrowsercomponent.h"
#include "ui_modelbrowsercomponent.h"
namespace BlackGui
{
namespace Components
{
CModelBrowserComponent::CModelBrowserComponent(QWidget *parent) :
QFrame(parent),
ui(new Ui::CModelBrowserComponent)
{
ui->setupUi(this);
}
CModelBrowserComponent::~CModelBrowserComponent()
{
// void
}
} // ns
} // ns

View File

@@ -0,0 +1,40 @@
/* Copyright (C) 2019
* 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. 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_MODELBROWSERCOMPONENT_H
#define BLACKGUI_COMPONENTS_MODELBROWSERCOMPONENT_H
#include <QFrame>
#include <QScopedPointer>
namespace Ui { class CModelBrowserComponent; }
namespace BlackGui
{
namespace Components
{
//! Allow to browse thru the model set
class CModelBrowserComponent : public QFrame
{
Q_OBJECT
public:
//! Constructor
explicit CModelBrowserComponent(QWidget *parent = nullptr);
//! Destructor
virtual ~CModelBrowserComponent() override;
private:
QScopedPointer <Ui::CModelBrowserComponent> ui;
};
} // ns
} // ns
#endif // guard

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CModelBrowserComponent</class>
<widget class="QFrame" name="CModelBrowserComponent">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>480</height>
</rect>
</property>
<property name="windowTitle">
<string>Model browser</string>
</property>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,28 @@
/* Copyright (C) 2019
* 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. 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 "modelbrowserdialog.h"
#include "ui_modelbrowserdialog.h"
namespace BlackGui
{
namespace Components
{
CModelBrowserDialog::CModelBrowserDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CModelBrowserDialog)
{
ui->setupUi(this);
}
CModelBrowserDialog::~CModelBrowserDialog()
{
// void;
}
} // ns
} // ns

View File

@@ -0,0 +1,41 @@
/* Copyright (C) 2019
* 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. 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_MODELBROWSERDIALOG_H
#define BLACKGUI_COMPONENTS_MODELBROWSERDIALOG_H
#include "blackgui/blackguiexport.h"
#include <QDialog>
#include <QScopedPointer>
namespace Ui { class CModelBrowserDialog; }
namespace BlackGui
{
namespace Components
{
//! Model browser as dialog
class BLACKGUI_EXPORT CModelBrowserDialog : public QDialog
{
Q_OBJECT
public:
//! Constructor
explicit CModelBrowserDialog(QWidget *parent = nullptr);
//! Destructor
virtual ~CModelBrowserDialog() override;
private:
QScopedPointer<Ui::CModelBrowserDialog> ui;
};
} // ns
} // ns
#endif // guard

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CModelBrowserDialog</class>
<widget class="QDialog" name="CModelBrowserDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>480</height>
</rect>
</property>
<property name="windowTitle">
<string>Model browser</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="BlackGui::Components::CModelBrowserComponent" name="comp_ModelBrowser"/>
</item>
<item>
<widget class="QDialogButtonBox" name="bb_ModelBrowserDialog">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>BlackGui::Components::CModelBrowserComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/modelbrowsercomponent.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>bb_ModelBrowserDialog</sender>
<signal>accepted()</signal>
<receiver>CModelBrowserDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>bb_ModelBrowserDialog</sender>
<signal>rejected()</signal>
<receiver>CModelBrowserDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>