Removed the AmazonStyle executable and files as they are old/invalid (#1733)
* signoff Signed-off-by: Terry Michaels <miterenc@amazon.com>main
parent
37a899f5e1
commit
b331eea9ca
@ -1,145 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ConditionGroupWidget.h"
|
||||
#include "ConditionWidget.h"
|
||||
#include <QGridLayout>
|
||||
#include <QToolButton>
|
||||
#include <QWidgetItem>
|
||||
#include <QLayoutItem>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QStyleOptionToolButton>
|
||||
|
||||
enum Action {
|
||||
ActionAdd,
|
||||
ActionRemove
|
||||
};
|
||||
|
||||
class ActionButton : public QToolButton
|
||||
{
|
||||
public:
|
||||
explicit ActionButton(QWidget *parent = nullptr)
|
||||
: QToolButton(parent)
|
||||
{
|
||||
setAttribute(Qt::WA_Hover);
|
||||
}
|
||||
|
||||
void paintEvent(QPaintEvent *)
|
||||
{
|
||||
QStyleOptionToolButton opt;
|
||||
initStyleOption(&opt);
|
||||
auto state = (opt.state & QStyle::State_Sunken) ? QIcon::Active
|
||||
: ((opt.state & QStyle::State_MouseOver) ? QIcon::Selected
|
||||
: QIcon::Normal);
|
||||
|
||||
QPixmap pix = icon().pixmap(QSize(16, 16), state);
|
||||
QPainter p(this);
|
||||
QRect pixRect = pix.rect();
|
||||
pixRect.moveCenter(rect().center());
|
||||
pixRect.adjust(-2, 1, -2, 1);
|
||||
p.drawPixmap(pixRect , pix);
|
||||
}
|
||||
};
|
||||
|
||||
ConditionGroupWidget::ConditionGroupWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_layout(new QGridLayout(this))
|
||||
{
|
||||
m_addIcon.addPixmap(QPixmap(":/stylesheet/img/condition_add.png"), QIcon::Normal);
|
||||
m_addIcon.addPixmap(QPixmap(":/stylesheet/img/condition_add_hover.png"), QIcon::Selected);
|
||||
m_addIcon.addPixmap(QPixmap(":/stylesheet/img/condition_add_pressed.png"), QIcon::Active);
|
||||
|
||||
m_delIcon.addPixmap(QPixmap(":/stylesheet/img/condition_remove.png"), QIcon::Normal);
|
||||
m_delIcon.addPixmap(QPixmap(":/stylesheet/img/condition_remove_hover.png"), QIcon::Selected);
|
||||
m_delIcon.addPixmap(QPixmap(":/stylesheet/img/condition_remove_pressed.png"), QIcon::Active);
|
||||
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
|
||||
m_layout->setHorizontalSpacing(0);
|
||||
|
||||
// Lets have at least one condition
|
||||
appendCondition();
|
||||
}
|
||||
|
||||
void ConditionGroupWidget::appendCondition()
|
||||
{
|
||||
auto cond = new ConditionWidget();
|
||||
connect(cond, SIGNAL(geometryChanged()), this, SLOT(update()));
|
||||
m_layout->addWidget(cond, count(), 0);
|
||||
m_layout->addWidget(new ActionButton(), count() - 1, 1);
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
void ConditionGroupWidget::removeCondition(int n)
|
||||
{
|
||||
if (n >= 0 && n < count() && count() > 1) {
|
||||
m_layout->removeItem(m_layout->itemAtPosition(n, 0));
|
||||
m_layout->removeItem(m_layout->itemAtPosition(n, 1));
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
int ConditionGroupWidget::count() const
|
||||
{
|
||||
return m_layout->rowCount();
|
||||
}
|
||||
|
||||
void ConditionGroupWidget::paintEvent(QPaintEvent *)
|
||||
{
|
||||
const int c = count();
|
||||
for (int i = 0; i < c - 1; ++i) {
|
||||
ConditionWidget *cond1 = conditionAt(i);
|
||||
ConditionWidget *cond2 = conditionAt(i + 1);
|
||||
if (!cond1 || !cond2)
|
||||
continue; // defensive, doesn't happen
|
||||
|
||||
const int separatorHeight = 3;
|
||||
const int y = ((cond1->geometry().bottom() + cond2->y()) / 2) - (separatorHeight / 2);
|
||||
QPainter p(this);
|
||||
p.setPen(QColor(50, 52, 53));
|
||||
p.setBrush(QColor(94, 96, 96));
|
||||
p.drawRoundedRect(QRect(0, y, width() - 1, separatorHeight), 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
ConditionWidget *ConditionGroupWidget::conditionAt(int row) const
|
||||
{
|
||||
if (row < 0 || row >= count())
|
||||
return nullptr;
|
||||
|
||||
if (auto item = m_layout->itemAtPosition(row, 0))
|
||||
return qobject_cast<ConditionWidget*>(item->widget());
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ConditionGroupWidget::updateButtons()
|
||||
{
|
||||
update();
|
||||
const int n = count();
|
||||
for (int i = 0; i < n; ++i) {
|
||||
if (auto item = m_layout->itemAtPosition(i, 1)) {
|
||||
if (auto button = qobject_cast<QToolButton*>(item->widget())) {
|
||||
bool isLast = i == n - 1;
|
||||
button->setCheckable(true);
|
||||
button->setChecked(true);
|
||||
button->setIcon(isLast ? m_addIcon : m_delIcon);
|
||||
button->disconnect();
|
||||
|
||||
if (isLast) {
|
||||
connect(button, &QToolButton::clicked, this, &ConditionGroupWidget::appendCondition);
|
||||
} else {
|
||||
connect(button, &QToolButton::clicked, this, [this, i] {
|
||||
removeCondition(i);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "StyleGallery/moc_ConditionGroupWidget.cpp"
|
||||
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CONDITIONGROUPWIDGET_H
|
||||
#define CONDITIONGROUPWIDGET_H
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QWidget>
|
||||
#include <QIcon>
|
||||
#endif
|
||||
|
||||
class QGridLayout;
|
||||
class ConditionWidget;
|
||||
|
||||
class ConditionGroupWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ConditionGroupWidget(QWidget *parent = nullptr);
|
||||
void appendCondition();
|
||||
void removeCondition(int n);
|
||||
int count() const;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
private:
|
||||
ConditionWidget* conditionAt(int row) const;
|
||||
void updateButtons();
|
||||
QGridLayout *const m_layout;
|
||||
QIcon m_addIcon;
|
||||
QIcon m_delIcon;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ConditionWidget.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QComboBox>
|
||||
#include <QCheckBox>
|
||||
#include <QLineEdit>
|
||||
|
||||
ConditionWidget::ConditionWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
auto layout = new QHBoxLayout(this);
|
||||
auto checkbox = new QCheckBox();
|
||||
auto combo1 = new QComboBox();
|
||||
combo1->addItem(QStringLiteral("Asset Type"));
|
||||
combo1->addItem(QStringLiteral("Asset Name"));
|
||||
combo1->setProperty("class", "condition");
|
||||
auto combo2 = new QComboBox();
|
||||
combo2->setFixedWidth(88);
|
||||
combo2->setProperty("class", "condition");
|
||||
combo2->addItem(QStringLiteral("is"));
|
||||
combo2->addItem(QStringLiteral("is not"));
|
||||
auto lineedit = new QLineEdit();
|
||||
|
||||
layout->addWidget(checkbox);
|
||||
layout->addWidget(combo1);
|
||||
layout->addWidget(combo2);
|
||||
layout->addWidget(lineedit);
|
||||
layout->setSpacing(5);
|
||||
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
|
||||
}
|
||||
|
||||
void ConditionWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QWidget::resizeEvent(event);
|
||||
emit geometryChanged();
|
||||
}
|
||||
|
||||
void ConditionWidget::moveEvent(QMoveEvent *event)
|
||||
{
|
||||
QWidget::moveEvent(event);
|
||||
emit geometryChanged();
|
||||
}
|
||||
|
||||
#include "StyleGallery/moc_ConditionWidget.cpp"
|
||||
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONDITIONWIDGET_H
|
||||
#define CONDITIONWIDGET_H
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QWidget>
|
||||
#endif
|
||||
|
||||
class ConditionWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ConditionWidget(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void geometryChanged();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void moveEvent(QMoveEvent *event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "DeploymentsWidget.h"
|
||||
#include <AzQtComponents/Components/StyledDockWidget.h>
|
||||
#include <QPainter>
|
||||
#include <QInputDialog>
|
||||
|
||||
using namespace AzQtComponents;
|
||||
|
||||
DeploymentsWidget::DeploymentsWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::DeploymentsWidget())
|
||||
{
|
||||
setFixedSize(263, 238);
|
||||
ui->setupUi(this);
|
||||
ui->titlebar->setWindowTitleOverride(tr("Deployments"));
|
||||
//ui->titlebar->setFrameHackEnabled(true);
|
||||
ui->titlebar->setForceInactive(true);
|
||||
ui->deploymentOk->setProperty("class", "Primary");
|
||||
ui->contents->setAttribute(Qt::WA_TranslucentBackground);
|
||||
ui->blueLabel->setProperty("class", "addDeployment"); // Should this label style be more generic ?
|
||||
ui->blueLabel->installEventFilter(this);
|
||||
ui->blueLabel->setCursor(Qt::PointingHandCursor);
|
||||
}
|
||||
|
||||
void DeploymentsWidget::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter p(this);
|
||||
StyledDockWidget::drawFrame(p, rect(), false);
|
||||
|
||||
p.setPen(QColor(35, 36, 37));
|
||||
p.drawLine(1, height()-51, width() - 2, height() - 51);
|
||||
p.setPen(QColor(66, 67, 68));
|
||||
p.drawLine(1, height()-50, width() - 2, height() - 50);
|
||||
}
|
||||
|
||||
bool DeploymentsWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
addDeployment();
|
||||
return true;
|
||||
}
|
||||
|
||||
return QWidget::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
void DeploymentsWidget::addDeployment()
|
||||
{
|
||||
QInputDialog::getText(this, tr("Enter deployment name"), QString());
|
||||
}
|
||||
|
||||
#include "StyleGallery/moc_DeploymentsWidget.cpp"
|
||||
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DEPLOYMENTSWIDGET_H
|
||||
#define DEPLOYMENTSWIDGET_H
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <AzQtComponents/StyleGallery/ui_deploymentswidget.h>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QScopedPointer>
|
||||
#endif
|
||||
|
||||
class DeploymentsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DeploymentsWidget(QWidget *parent = 0);
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
bool eventFilter(QObject *watched, QEvent *event) override;
|
||||
void addDeployment();
|
||||
private:
|
||||
QScopedPointer<Ui::DeploymentsWidget> ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#include "MyCombo.h"
|
||||
|
||||
MyComboBox::MyComboBox(QWidget *parent)
|
||||
: QComboBox(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#include "StyleGallery/moc_MyCombo.cpp"
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#ifndef MY_COMBO_H
|
||||
#define MY_COMBO_H
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QComboBox>
|
||||
#endif
|
||||
|
||||
class MyComboBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MyComboBox(QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Description : CViewportTitleDlg implementation file
|
||||
|
||||
|
||||
#include "ViewportTitleDlg.h"
|
||||
|
||||
#include <AzQtComponents/StyleGallery/ui_ViewportTitleDlg.h>
|
||||
#include <QAction>
|
||||
|
||||
ViewportTitleDlg::ViewportTitleDlg(QWidget* pParent)
|
||||
: QWidget(pParent),
|
||||
m_ui(new Ui::ViewportTitleDlg)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
OnInitDialog();
|
||||
m_ui->m_viewportSearch->setIcon(QIcon(":/stylesheet/img/16x16/Search.png"));
|
||||
|
||||
auto clearAction = new QAction(this);
|
||||
clearAction->setIcon(QIcon(":/stylesheet/img/16x16/lineedit-clear.png"));
|
||||
|
||||
m_ui->m_viewportSearch->setFixedWidth(190);
|
||||
}
|
||||
|
||||
ViewportTitleDlg::~ViewportTitleDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void ViewportTitleDlg::OnInitDialog()
|
||||
{
|
||||
m_ui->m_titleBtn->setText(m_title);
|
||||
m_ui->m_sizeStaticCtrl->setText(QString());
|
||||
|
||||
connect(m_ui->m_maxBtn, &QToolButton::clicked, this, &ViewportTitleDlg::OnMaximize);
|
||||
connect(m_ui->m_toggleHelpersBtn, &QToolButton::clicked, this, &ViewportTitleDlg::OnToggleHelpers);
|
||||
connect(m_ui->m_toggleDisplayInfoBtn, &QToolButton::clicked, this, &ViewportTitleDlg::OnToggleDisplayInfo);
|
||||
|
||||
m_ui->m_maxBtn->setProperty("class", "big");
|
||||
m_ui->m_toggleHelpersBtn->setProperty("class", "big");
|
||||
m_ui->m_toggleDisplayInfoBtn->setProperty("class", "big");
|
||||
}
|
||||
|
||||
void ViewportTitleDlg::SetTitle( const QString &title )
|
||||
{
|
||||
m_title = title;
|
||||
m_ui->m_titleBtn->setText(m_title);
|
||||
m_ui->m_viewportSearch->setVisible(title == QLatin1String("Perspective"));
|
||||
}
|
||||
|
||||
void ViewportTitleDlg::OnMaximize()
|
||||
{
|
||||
}
|
||||
|
||||
void ViewportTitleDlg::OnToggleHelpers()
|
||||
{
|
||||
}
|
||||
|
||||
void ViewportTitleDlg::OnToggleDisplayInfo()
|
||||
{
|
||||
}
|
||||
|
||||
#include "StyleGallery/moc_ViewportTitleDlg.cpp"
|
||||
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QWidget>
|
||||
#endif
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class ViewportTitleDlg;
|
||||
}
|
||||
|
||||
class ViewportTitleDlg : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ViewportTitleDlg(QWidget* pParent = nullptr);
|
||||
virtual ~ViewportTitleDlg();
|
||||
protected slots:
|
||||
void OnMaximize();
|
||||
void OnToggleHelpers();
|
||||
void OnToggleDisplayInfo();
|
||||
private:
|
||||
void OnInitDialog();
|
||||
void SetTitle(const QString &title);
|
||||
|
||||
QString m_title = QLatin1String("Perspective");
|
||||
QScopedPointer<Ui::ViewportTitleDlg> m_ui;
|
||||
};
|
||||
@ -1,225 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ViewportTitleDlg</class>
|
||||
<widget class="QWidget" name="ViewportTitleDlg">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>574</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,2,0,0,0,0,0,0,0,0,0,0,0">
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_titleBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Static</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AzQtComponents::ToolButtonLineEdit" name="m_viewportSearch">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>147</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>147</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>FOV:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_fovStaticCtrl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>120°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Ratio:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_ratioStaticCtrl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>000:000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_sizeStaticCtrl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0000 x 0000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AzQtComponents::ButtonDivider" name="divider1" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_toggleDisplayInfoBtn">
|
||||
<property name="toolTip">
|
||||
<string>Toggle display info</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/stylesheet/img/UI20/Info.svg</normaloff>:/stylesheet/img/UI20/Info.svg</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_toggleHelpersBtn">
|
||||
<property name="toolTip">
|
||||
<string>Toggle display helpers</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/stylesheet/img/UI20/Helpers.svg</normaloff>:/stylesheet/img/UI20/Helpers.svg</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AzQtComponents::ButtonDivider" name="divider2" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_maxBtn">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/stylesheet/img/16x16/Maximize.png</normaloff>:/stylesheet/img/16x16/Maximize.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="rightSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>5</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AzQtComponents::ToolButtonLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>AzQtComponents/Components/ToolButtonLineEdit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>AzQtComponents::ButtonDivider</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>AzQtComponents/Components/ButtonDivider.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@ -1,179 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="4.0527225mm"
|
||||
height="4.0527225mm"
|
||||
viewBox="0 0 14.36004 14.36004"
|
||||
id="svg3348"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="assets.svg">
|
||||
<defs
|
||||
id="defs3350">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4232">
|
||||
<stop
|
||||
style="stop-color:#7b7b7b;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4234" />
|
||||
<stop
|
||||
style="stop-color:#666666;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4236" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4232"
|
||||
id="linearGradient4238"
|
||||
x1="13.081557"
|
||||
y1="1055.9957"
|
||||
x2="13.081557"
|
||||
y2="1070.327"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="25.755391"
|
||||
inkscape:cx="19.18662"
|
||||
inkscape:cy="25.784244"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata3353">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-0.31998014,-1037.6822)">
|
||||
<ellipse
|
||||
style="opacity:0;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#4e413a;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path3356"
|
||||
cx="27.955313"
|
||||
cy="1029.9979"
|
||||
rx="18.015646"
|
||||
ry="19.879333" />
|
||||
<ellipse
|
||||
style="opacity:0;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#4e413a;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path3358"
|
||||
cx="26.091625"
|
||||
cy="1032.4829"
|
||||
rx="27.334084"
|
||||
ry="23.606709" />
|
||||
<ellipse
|
||||
style="opacity:0;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#4e413a;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path3360"
|
||||
cx="6.2122917"
|
||||
cy="1006.3912"
|
||||
rx="41.001125"
|
||||
ry="44.7285" />
|
||||
<ellipse
|
||||
style="opacity:0;fill:#417176;fill-opacity:0.44148937;fill-rule:evenodd;stroke:#4e413a;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path4162"
|
||||
cx="24.849167"
|
||||
cy="1026.8918"
|
||||
rx="16.773188"
|
||||
ry="41.622353" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#3675dd;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path4164"
|
||||
cx="-4.3371701"
|
||||
cy="1029.7621"
|
||||
r="6.6800199"
|
||||
inkscape:export-xdpi="94.010872"
|
||||
inkscape:export-ydpi="94.010872"
|
||||
inkscape:export-filename="/data/secured/home/serj/kdab/amazon-style/img/radio-hover.png" />
|
||||
<ellipse
|
||||
style="opacity:1;fill:#3675dd;fill-opacity:1;fill-rule:evenodd;stroke:#3675dd;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path4164-1"
|
||||
cx="24.819975"
|
||||
cy="1043.5323"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-filename="/data/secured/home/serj/kdab/amazon-style/img/radio-selected.png"
|
||||
rx="7.4999924"
|
||||
ry="7.4999919" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#3675dd;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path4164-5"
|
||||
cx="26.94738"
|
||||
cy="1025.5796"
|
||||
r="7.4999933"
|
||||
inkscape:export-xdpi="90.000015"
|
||||
inkscape:export-ydpi="90.000015"
|
||||
inkscape:export-filename="/data/secured/home/serj/kdab/amazon-style/img/radio-unselected.png" />
|
||||
<circle
|
||||
style="opacity:1;fill:url(#linearGradient4238);fill-opacity:1;fill-rule:evenodd;stroke:#3675dd;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path4164-5-7"
|
||||
cx="12.839327"
|
||||
cy="1063.1339"
|
||||
r="7.4999924"
|
||||
inkscape:export-xdpi="90.000015"
|
||||
inkscape:export-ydpi="90.000015"
|
||||
inkscape:export-filename="/data/secured/home/serj/kdab/amazon-style/img/radio-disabled.png" />
|
||||
<ellipse
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#3675dd;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="path4259"
|
||||
cx="24.819977"
|
||||
cy="1043.6315"
|
||||
rx="2.9999933"
|
||||
ry="3.139528"
|
||||
inkscape:export-filename="/data/secured/home/serj/kdab/amazon-style/img/radio-selected.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="fill:#4285f4;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4263"
|
||||
width="10.999988"
|
||||
height="10.999988"
|
||||
x="7.7876616"
|
||||
y="1014.0333"
|
||||
rx="2.1999974"
|
||||
inkscape:export-filename="/data/secured/home/serj/kdab/amazon-style/img/combo-checked.png"
|
||||
inkscape:export-xdpi="90.000015"
|
||||
inkscape:export-ydpi="90.000015" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#eeeeee;stroke-width:1.09999859;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 9.6716909,1020.2265 2.4883481,2.5829 c 4.574398,-6.5447 4.574398,-6.5447 4.574398,-6.5447"
|
||||
id="path4269"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc"
|
||||
inkscape:export-filename="/data/secured/home/serj/kdab/amazon-style/img/combo-checked.png"
|
||||
inkscape:export-xdpi="90.000015"
|
||||
inkscape:export-ydpi="90.000015" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.3 KiB |
@ -1,176 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DeploymentsWidget</class>
|
||||
<widget class="QWidget" name="DeploymentsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>263</width>
|
||||
<height>238</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>263</width>
|
||||
<height>238</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>263</width>
|
||||
<height>238</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="AzQtComponents::TitleBar" name="titlebar" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="contents" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>You must select a default deployment where
|
||||
you would like to add these resurces.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="blueLabel">
|
||||
<property name="text">
|
||||
<string>Add a deployment</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton">
|
||||
<property name="text">
|
||||
<string>New deployment name 3</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_2">
|
||||
<property name="text">
|
||||
<string>Deployment name 2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_3">
|
||||
<property name="text">
|
||||
<string>Deployment name 1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deploymentO2">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deploymentOk">
|
||||
<property name="text">
|
||||
<string>Ok</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AzQtComponents::TitleBar</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>AzQtComponents/Components/Titlebar.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@ -1,300 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#include "mainwidget.h"
|
||||
#include <AzCore/Component/ComponentApplication.h>
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzQtComponents/Components/StyledDockWidget.h>
|
||||
#include <AzQtComponents/Components/ToolButtonComboBox.h>
|
||||
#include <AzQtComponents/Components/ToolButtonLineEdit.h>
|
||||
#include <AzQtComponents/Components/WindowDecorationWrapper.h>
|
||||
#include <AzQtComponents/Components/O3DEStylesheet.h>
|
||||
#include "MyCombo.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <QStyleFactory>
|
||||
#include <QMainWindow>
|
||||
#include <QAction>
|
||||
#include <QMenuBar>
|
||||
#include <QToolBar>
|
||||
#include <QDockWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QComboBox>
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QSettings>
|
||||
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <AzQtComponents/Components/StyledDetailsTableView.h>
|
||||
#include <AzQtComponents/Components/StyledDetailsTableModel.h>
|
||||
|
||||
using namespace AzQtComponents;
|
||||
|
||||
QToolBar * toolBar()
|
||||
{
|
||||
auto t = new QToolBar(QString());
|
||||
QAction *a = nullptr;
|
||||
QMenu *menu = nullptr;
|
||||
auto but = new QToolButton();
|
||||
menu = new QMenu();
|
||||
but->setMenu(menu);
|
||||
but->setCheckable(true);
|
||||
but->setPopupMode(QToolButton::MenuButtonPopup);
|
||||
but->setDefaultAction(new QAction(QStringLiteral("Test"), but));
|
||||
but->setIcon(QIcon(":/stylesheet/img/undo.png"));
|
||||
t->addWidget(but);
|
||||
|
||||
a = t->addAction(QIcon(":/stylesheet/img/select.png"), QString());
|
||||
a->setCheckable(true);
|
||||
t->addSeparator();
|
||||
|
||||
auto tbcb = new AzQtComponents::ToolButtonComboBox();
|
||||
tbcb->setIcon(QIcon(":/stylesheet/img/angle.png"));
|
||||
tbcb->comboBox()->addItem("1");
|
||||
tbcb->comboBox()->addItem("2");
|
||||
tbcb->comboBox()->addItem("3");
|
||||
tbcb->comboBox()->addItem("4");
|
||||
t->addWidget(tbcb);
|
||||
|
||||
auto tble = new AzQtComponents::ToolButtonLineEdit();
|
||||
tble->setFixedWidth(130);
|
||||
tble->setIcon(QIcon(":/stylesheet/img/16x16/Search.png"));
|
||||
t->addWidget(tble);
|
||||
|
||||
auto combo = new QComboBox();
|
||||
combo->addItem("Test1");
|
||||
combo->addItem("Test3");
|
||||
combo->addItem("Selection,Area");
|
||||
t->addWidget(combo);
|
||||
|
||||
const QStringList iconNames = {
|
||||
"Align_object_to_surface",
|
||||
"Align_to_grid",
|
||||
"Align_to_Object",
|
||||
"Angle",
|
||||
"Asset_Browser",
|
||||
"Audio",
|
||||
"Database_view",
|
||||
"Delete_named_selection",
|
||||
"Follow_terrain",
|
||||
"Freeze",
|
||||
"Gepetto",
|
||||
"Get_physics_state",
|
||||
"Grid",
|
||||
"layer_editor",
|
||||
"layers",
|
||||
"LIghting",
|
||||
"lineedit-clear",
|
||||
"LOD_generator",
|
||||
"LUA",
|
||||
"Material",
|
||||
"Maximize",
|
||||
"Measure",
|
||||
"Move",
|
||||
"Object_follow_terrain",
|
||||
"Object_list",
|
||||
"Redo",
|
||||
"Reset_physics_state",
|
||||
"Scale",
|
||||
"select_object",
|
||||
"Select",
|
||||
"Select_terrain",
|
||||
"Simulate_Physics_on_selected_objects",
|
||||
"Substance",
|
||||
"Terrain",
|
||||
"Terrain_Texture",
|
||||
"Texture_browser",
|
||||
"Time_of_Day",
|
||||
"Trackview",
|
||||
"Translate",
|
||||
"UI_editor",
|
||||
"undo",
|
||||
"Unfreeze_all",
|
||||
"Vertex_snapping" };
|
||||
|
||||
for (auto name : iconNames) {
|
||||
auto a2 = t->addAction(QIcon(QString(":/stylesheet/img/16x16/%1.png").arg(name)), nullptr);
|
||||
a2->setToolTip(name);
|
||||
a2->setDisabled(name == "Audio");
|
||||
}
|
||||
|
||||
combo = new MyComboBox();
|
||||
combo->addItem("Test1");
|
||||
combo->addItem("Test3");
|
||||
combo->addItem("Selection,Area");
|
||||
t->addWidget(combo);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr)
|
||||
: QMainWindow(parent)
|
||||
, m_settings("org", "app")
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
QVariant geoV = m_settings.value("geo");
|
||||
if (geoV.isValid()) {
|
||||
restoreGeometry(geoV.toByteArray());
|
||||
}
|
||||
}
|
||||
|
||||
~MainWindow()
|
||||
{
|
||||
qDebug() << "Deleted mainwindow";
|
||||
auto geo = saveGeometry();
|
||||
m_settings.setValue("geo", geo);
|
||||
}
|
||||
private:
|
||||
QSettings m_settings;
|
||||
};
|
||||
|
||||
static void addMenu(QMainWindow *w, const QString &name)
|
||||
{
|
||||
auto action = w->menuBar()->addAction(name);
|
||||
auto menu = new QMenu();
|
||||
action->setMenu(menu);
|
||||
menu->addAction("Item 1");
|
||||
menu->addAction("Item 2");
|
||||
menu->addAction("Item 3");
|
||||
menu->addAction("Longer item 4");
|
||||
menu->addAction("Longer item 5");
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
AzQtComponents::O3DEStylesheet stylesheet(&app);
|
||||
AZ::IO::FixedMaxPath engineRootPath;
|
||||
{
|
||||
AZ::ComponentApplication componentApplication(argc, argv);
|
||||
auto settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
settingsRegistry->Get(engineRootPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder);
|
||||
}
|
||||
stylesheet.initialize(&app, engineRootPath);
|
||||
|
||||
auto wrapper = new AzQtComponents::WindowDecorationWrapper();
|
||||
QMainWindow *w = new MainWindow();
|
||||
w->setWindowTitle("Component Gallery");
|
||||
auto widget = new MainWidget(w);
|
||||
w->resize(550, 900);
|
||||
w->setMinimumWidth(500);
|
||||
wrapper->setGuest(w);
|
||||
wrapper->enableSaveRestoreGeometry("app", "org", "windowGeometry");
|
||||
w->setCentralWidget(widget);
|
||||
w->setWindowFlags(w->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
w->show();
|
||||
|
||||
auto action = w->menuBar()->addAction("Menu 1");
|
||||
|
||||
auto fileMenu = new QMenu();
|
||||
action->setMenu(fileMenu);
|
||||
auto openDock = fileMenu->addAction("Open dockwidget");
|
||||
QObject::connect(openDock, &QAction::triggered, w, [&w] {
|
||||
auto dock = new AzQtComponents::StyledDockWidget(QLatin1String("O3DE"), w);
|
||||
auto button = new QPushButton("Click to dock");
|
||||
auto wid = new QWidget();
|
||||
auto widLayout = new QVBoxLayout(wid);
|
||||
widLayout->addWidget(button);
|
||||
wid->resize(300, 200);
|
||||
QObject::connect(button, &QPushButton::clicked, dock, [dock]{
|
||||
dock->setFloating(!dock->isFloating());
|
||||
});
|
||||
w->addDockWidget(Qt::BottomDockWidgetArea, dock);
|
||||
dock->setWidget(wid);
|
||||
dock->resize(300, 200);
|
||||
dock->setFloating(true);
|
||||
dock->show();
|
||||
});
|
||||
|
||||
|
||||
QAction* newAction = fileMenu->addAction("Test StyledDetailsTableView");
|
||||
newAction->setShortcut(QKeySequence::Delete);
|
||||
QObject::connect(newAction, &QAction::triggered, w, [w]() {
|
||||
QDialog temp(w);
|
||||
temp.setWindowTitle("StyleTableWidget Test");
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(&temp);
|
||||
|
||||
AzQtComponents::StyledDetailsTableModel* tableModel = new AzQtComponents::StyledDetailsTableModel();
|
||||
tableModel->AddColumn("Status", AzQtComponents::StyledDetailsTableModel::StatusIcon);
|
||||
tableModel->AddColumn("Platform");
|
||||
tableModel->AddColumn("Message");
|
||||
tableModel->AddColumnAlias("message", "Message");
|
||||
|
||||
tableModel->AddPrioritizedKey("Data3");
|
||||
tableModel->AddDeprioritizedKey("Data1");
|
||||
|
||||
auto table = new AzQtComponents::StyledDetailsTableView();
|
||||
table->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
table->setModel(tableModel);
|
||||
|
||||
{
|
||||
AzQtComponents::StyledDetailsTableModel::TableEntry entry;
|
||||
entry.Add("Message", "A very very long first message. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus et maximus tortor, ac commodo ante. Maecenas porta posuere mauris, vel consectetur arcu ornare interdum. Praesent rhoncus consequat neque, non volutpat mauris cursus a. Proin a nisl quis dui consectetur malesuada a et diam. Integer finibus luctus nibh nec cursus.");
|
||||
entry.Add("Platform", "PC");
|
||||
entry.Add("Status", AzQtComponents::StyledDetailsTableModel::StatusSuccess);
|
||||
tableModel->AddEntry(entry);
|
||||
}
|
||||
|
||||
{
|
||||
AzQtComponents::StyledDetailsTableModel::TableEntry entry;
|
||||
entry.Add("Message", "Second message. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus et maximus tortor, ac commodo ante. Maecenas porta posuere mauris, vel consectetur arcu ornare interdum. Praesent rhoncus consequat neque, non volutpat mauris cursus a. Proin a nisl quis dui consectetur malesuada a et diam. Integer finibus luctus nibh nec cursus.");
|
||||
entry.Add("Platform", "PC");
|
||||
entry.Add("Status", AzQtComponents::StyledDetailsTableModel::StatusError);
|
||||
entry.Add("Data1", "Deprioritized item.");
|
||||
entry.Add("Data3", "Prioritized item.");
|
||||
tableModel->AddEntry(entry);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
AzQtComponents::StyledDetailsTableModel::TableEntry entry;
|
||||
entry.Add("message", "Third message");
|
||||
entry.Add("Status", AzQtComponents::StyledDetailsTableModel::StatusWarning);
|
||||
entry.Add("Platform", "PC");
|
||||
entry.Add("Index1", "A smaller detail.");
|
||||
entry.Add("Index2", "Another small detail.");
|
||||
entry.Add("Index3", "A final small detail.");
|
||||
tableModel->AddEntry(entry);
|
||||
}
|
||||
|
||||
layout->addWidget(table);
|
||||
|
||||
temp.exec();
|
||||
});
|
||||
|
||||
QAction* refreshAction = fileMenu->addAction("Refresh Stylesheet");
|
||||
QObject::connect(refreshAction, &QAction::triggered, refreshAction, [&stylesheet]() {
|
||||
stylesheet.Refresh();
|
||||
});
|
||||
|
||||
|
||||
addMenu(w, "Menu 2");
|
||||
addMenu(w, "Menu 3");
|
||||
addMenu(w, "Menu 4");
|
||||
|
||||
w->addToolBar(toolBar());
|
||||
|
||||
QObject::connect(widget, &MainWidget::reloadCSS, widget, [] {
|
||||
qDebug() << "Reloading CSS";
|
||||
qApp->setStyleSheet(QString());
|
||||
qApp->setStyleSheet("file:///style.qss");
|
||||
});
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@ -1,275 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#include "mainwidget.h"
|
||||
#include <AzQtComponents/StyleGallery/ui_mainwidget.h>
|
||||
#include <AzQtComponents/Components/ButtonStripe.h>
|
||||
#include <AzQtComponents/Components/DockBarButton.h>
|
||||
|
||||
#include <QButtonGroup>
|
||||
#include <QMenu>
|
||||
#include <QMouseEvent>
|
||||
#include <QStringList>
|
||||
#include <QStandardItemModel>
|
||||
#include <QMainWindow>
|
||||
#include <QMenuBar>
|
||||
#include <QDebug>
|
||||
|
||||
using namespace AzQtComponents;
|
||||
|
||||
MainWidget::MainWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::MainWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QStringList stripeButtonsNames = QStringList();
|
||||
stripeButtonsNames << "Controls" << "ItemViews" << "Styles" << "Layouts";
|
||||
ui->buttonStripe->addButtons(stripeButtonsNames, ui->stackedWidget->currentIndex());
|
||||
connect(ui->buttonStripe, &AzQtComponents::ButtonStripe::buttonClicked,
|
||||
ui->stackedWidget, &QStackedWidget::setCurrentIndex);
|
||||
|
||||
initializeControls();
|
||||
initializeItemViews();
|
||||
|
||||
connect(ui->button1, &QPushButton::clicked, this, []{
|
||||
auto mainwindow = new QMainWindow();
|
||||
auto menu = new QMenu("File");
|
||||
auto mb = new QMenuBar();
|
||||
menu->addAction("Action1");
|
||||
menu->addAction("Action2");
|
||||
menu->addAction("Action3");
|
||||
mb->addMenu(menu);
|
||||
mb->addAction("Edit");
|
||||
mb->addMenu("Create");
|
||||
mb->addMenu("Select");
|
||||
mb->addMenu("Modify");
|
||||
mb->addMenu("Display");
|
||||
mainwindow->setMenuBar(mb);
|
||||
mainwindow->resize(400, 400);
|
||||
mainwindow->show();
|
||||
mainwindow->raise();
|
||||
});
|
||||
}
|
||||
|
||||
MainWidget::~MainWidget()
|
||||
{
|
||||
delete ui;
|
||||
qDebug() << "Deleted main widget";
|
||||
}
|
||||
|
||||
void MainWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::MiddleButton) {
|
||||
emit reloadCSS();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::initializeControls()
|
||||
{
|
||||
auto menu = new QMenu();
|
||||
menu->addAction("Test 1");
|
||||
menu->addAction("Test 2");
|
||||
ui->button3->setMenu(menu);
|
||||
|
||||
auto menu2 = new QMenu();
|
||||
menu2->addAction("Test 1");
|
||||
menu2->addAction("Test 2");
|
||||
ui->disabledButton3->setMenu(menu2);
|
||||
|
||||
ui->selectedCheckBox->setCheckState(Qt::Checked);
|
||||
ui->enabledCheckBox->setCheckState(Qt::Unchecked);
|
||||
ui->tristateCheckBox->setCheckState(Qt::PartiallyChecked);
|
||||
|
||||
// TODO: Move these into subclass, can't be done from .css
|
||||
// Nicolas: or do it in the proxy style
|
||||
// Sergio: css doesn't work well with proxy style , says Qt's docs.
|
||||
ui->progressBar->setFormat(QString());
|
||||
ui->progressBar->setMaximumHeight(8);
|
||||
ui->progressBarFull->setFormat(QString());
|
||||
ui->progressBarFull->setMaximumHeight(8);
|
||||
|
||||
ui->button2->setProperty("class", "Primary");
|
||||
ui->disabledButton1->setProperty("class", "Primary");
|
||||
|
||||
ui->invalidLineEdit->setFlavor(AzQtComponents::StyledLineEdit::Invalid);
|
||||
ui->validLineEdit->setFlavor(AzQtComponents::StyledLineEdit::Valid);
|
||||
ui->questionLineEdit->setFlavor(AzQtComponents::StyledLineEdit::Question);
|
||||
ui->infoLineEdit->setFlavor(AzQtComponents::StyledLineEdit::Information);
|
||||
|
||||
// In order to try out validator impact on flavor
|
||||
ui->invalidLineEdit->setPlaceholderText("Enter 4 digits");
|
||||
ui->invalidLineEdit->setValidator(new QRegExpValidator(QRegExp("[1-9]\\d{3,3}")));
|
||||
|
||||
ui->disabledVectorEdit->setColors(qRgb(84, 190, 93), qRgb(226, 82, 67), qRgb(66, 133, 244));
|
||||
ui->vectorEdit->setColors(qRgb(84, 190, 93), qRgb(226, 82, 67), qRgb(66, 133, 244));
|
||||
ui->unknownVectorEdit->setColors(qRgb(84, 190, 93), qRgb(226, 82, 67), qRgb(66, 133, 244));
|
||||
ui->warningVectorEdit->setColors(qRgb(84, 190, 93), qRgb(226, 82, 67), qRgb(66, 133, 244));
|
||||
ui->warningVectorEdit->setFlavor(AzQtComponents::VectorEditElement::Invalid);
|
||||
|
||||
QStringList rpy = {tr("R"), tr("P"), tr("Y")};
|
||||
ui->disabledRPYVectorEdit->setLabels(rpy);
|
||||
ui->rPYVectorEdit->setLabels(rpy);
|
||||
ui->unknownRPYVectorEdit->setLabels(rpy);
|
||||
ui->warningRPYVectorEdit->setLabels(rpy);
|
||||
|
||||
ui->filterNameLineEdit->setClearButtonEnabled(true);
|
||||
|
||||
ui->comboBox_4->setEnabled(false);
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
ui->comboBox->addItem(QStringLiteral("combo 0: Item %1").arg(i));
|
||||
ui->comboBox_2->addItem(QStringLiteral("combo 2: Item %1").arg(i));
|
||||
ui->comboBox_3->addItem(QStringLiteral("combo 3: Item %1").arg(i));
|
||||
ui->comboBox_4->addItem(QStringLiteral("combo 4: Item %1").arg(i));
|
||||
ui->comboBox_5->addItem(QStringLiteral("combo 5: Item %1").arg(i));
|
||||
ui->comboBox_6->addItem(QStringLiteral("combo 6: Item %1").arg(i));
|
||||
}
|
||||
|
||||
ui->allCombo->setProperty("class", "condition");
|
||||
ui->allCombo->setFixedWidth(37);
|
||||
ui->allCombo->setFixedHeight(21);
|
||||
ui->allCombo->addItem("all");
|
||||
ui->allCombo->addItem("any");
|
||||
|
||||
|
||||
// Construct the available tag list.
|
||||
const int numAvailableTags = 128;
|
||||
QVector<QString> availableTags;
|
||||
availableTags.reserve(numAvailableTags+8);
|
||||
|
||||
availableTags.push_back("Healthy");
|
||||
availableTags.push_back("Tired");
|
||||
availableTags.push_back("Laughing");
|
||||
availableTags.push_back("Happy");
|
||||
availableTags.push_back("Smiling");
|
||||
availableTags.push_back("Weapon Left");
|
||||
availableTags.push_back("Weapon Right");
|
||||
availableTags.push_back("Loooooooooooooooooong Tag");
|
||||
|
||||
for (const QString& tag : availableTags)
|
||||
{
|
||||
ui->searchWidget->AddTypeFilter("Foo", tag);
|
||||
}
|
||||
|
||||
for (int i = 0; i < numAvailableTags; ++i)
|
||||
{
|
||||
QString tagName = "tag" + QString::number(i + 1);
|
||||
availableTags.push_back(tagName);
|
||||
if (i < 10)
|
||||
{
|
||||
ui->searchWidget->AddTypeFilter("Bar", tagName);
|
||||
}
|
||||
}
|
||||
|
||||
ui->tagSelector->Reinit(availableTags);
|
||||
|
||||
// Pre-select some of the tags.
|
||||
ui->tagSelector->SelectTag("Healthy");
|
||||
ui->tagSelector->SelectTag("Laughing");
|
||||
ui->tagSelector->SelectTag("Smiling");
|
||||
ui->tagSelector->SelectTag("Happy");
|
||||
ui->tagSelector->SelectTag("Weapon Left");
|
||||
|
||||
|
||||
ui->toolButton->setProperty("class", "QToolBar");
|
||||
ui->toolButton_2->setProperty("class", "QToolBar");
|
||||
ui->toolButton_3->setProperty("class", "QToolBar");
|
||||
ui->toolButton_4->setProperty("class", "QToolBar");
|
||||
ui->toolButton_5->setProperty("class", "QToolBar");
|
||||
ui->toolButton_6->setProperty("class", "QToolBar");
|
||||
ui->toolButton_7->setProperty("class", "QToolBar");
|
||||
ui->toolButton_8->setProperty("class", "QToolBar");
|
||||
ui->toolButton_9->setProperty("class", "QToolBar");
|
||||
ui->toolButton_10->setProperty("class", "QToolBar");
|
||||
ui->toolButton_11->setProperty("class", "QToolBar");
|
||||
ui->toolButton_12->setProperty("class", "QToolBar");
|
||||
|
||||
ui->conditionGroup->appendCondition();
|
||||
|
||||
// place the viewportTitle menu into the place holder we prepared in the ui file
|
||||
/*ViewportTitleDlg* viewPortTitleDlg = new ViewportTitleDlg(ui->ViewportTitle);
|
||||
auto viewPortTitleLayout = new QHBoxLayout();
|
||||
viewPortTitleLayout->addWidget(viewPortTitleDlg);
|
||||
ui->ViewportTitle->setLayout(viewPortTitleLayout);*/
|
||||
|
||||
QStringList fontSizeMockup = {"8pt", "9pt", "10pt", "11pt", "12pt", "14pt", "16pt", "18pt", "24pt", "30pt",};
|
||||
QStringList viewZoomMockup = {"20", "32", "40", "80", "160", "240"};
|
||||
const auto tbcbList = ui->toolButtonsComboBoxWidget->findChildren<AzQtComponents::ToolButtonComboBox*>();
|
||||
foreach (auto tbcb, tbcbList) {
|
||||
if (tbcb->objectName().contains("1")) {
|
||||
tbcb->setIcon(QIcon(QStringLiteral(":/stylesheet/img/16x16/Font_text.png")));
|
||||
tbcb->comboBox()->addItems(fontSizeMockup);
|
||||
} else if (tbcb->objectName().contains("2")) {
|
||||
tbcb->setIcon(QIcon(QStringLiteral(":/stylesheet/img/16x16/Picture_view.png")));
|
||||
tbcb->comboBox()->addItems(viewZoomMockup);
|
||||
} else if (tbcb->objectName().contains("3")) {
|
||||
tbcb->setIcon(QIcon(QStringLiteral(":/stylesheet/img/16x16/List_view.png")));
|
||||
tbcb->comboBox()->addItems(fontSizeMockup);
|
||||
}
|
||||
}
|
||||
|
||||
ui->WidgetHeader1->setForceInactive(true);
|
||||
ui->WidgetHeader1->setButtons({ AzQtComponents::DockBarButton::DividerButton, AzQtComponents::DockBarButton::MaximizeButton,
|
||||
AzQtComponents::DockBarButton::DividerButton, AzQtComponents::DockBarButton::CloseButton });
|
||||
ui->WidgetHeader1->setWindowTitleOverride("Widget Header");
|
||||
ui->WidgetHeader2->setButtons({AzQtComponents::DockBarButton::DividerButton, AzQtComponents::DockBarButton::MaximizeButton,
|
||||
AzQtComponents::DockBarButton::DividerButton, AzQtComponents::DockBarButton::CloseButton});
|
||||
ui->WidgetHeader2->setWindowTitleOverride("Widget Header");
|
||||
|
||||
ui->NonDockableWidget1->setForceInactive(true);
|
||||
ui->NonDockableWidget1->setWindowTitleOverride("Non-Dockable Widget");
|
||||
ui->NonDockableWidget1->setButtons({ AzQtComponents::DockBarButton::CloseButton });
|
||||
ui->NonDockableWidget1->setTearEnabled(false);
|
||||
ui->NonDockableWidget1->setDragEnabled(false);
|
||||
ui->NonDockableWidget2->setWindowTitleOverride("Non-Dockable Widget");
|
||||
ui->NonDockableWidget2->setButtons({ AzQtComponents::DockBarButton::CloseButton });
|
||||
ui->NonDockableWidget2->setTearEnabled(false);
|
||||
ui->NonDockableWidget2->setDragEnabled(false);
|
||||
|
||||
const auto rpbList = ui->RoundedButtonWidget->findChildren<QPushButton*>();
|
||||
foreach (auto rpb, rpbList) {
|
||||
if (rpb->objectName().contains("Small"))
|
||||
rpb->setProperty("class", "smallRounded");
|
||||
else
|
||||
rpb->setProperty("class", "rounded");
|
||||
}
|
||||
|
||||
ui->buttonOrange1->setProperty("class", "Primary");
|
||||
ui->buttonOrange2->setProperty("class", "Primary");
|
||||
|
||||
ui->tabWidget->tabBar()->setTabsClosable(true);
|
||||
connect(ui->tabWidget->tabBar(), &QTabBar::tabCloseRequested, this, [this](int index) {
|
||||
ui->tabWidget->removeTab(index);
|
||||
});
|
||||
}
|
||||
|
||||
void MainWidget::initializeItemViews()
|
||||
{
|
||||
auto model = new QStandardItemModel(this);
|
||||
model->setHorizontalHeaderLabels({QString(), tr("Priority"), tr("State"), tr("ID"), tr("Completed"), tr("Platform")});
|
||||
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
auto col0Item = new QStandardItem();
|
||||
col0Item->setCheckState(Qt::Checked);
|
||||
col0Item->setData(QVariant(QSize(10, 20)), Qt::SizeHintRole);
|
||||
col0Item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
|
||||
auto col1Item = new QStandardItem((i < 10) ? tr("Top"): "");
|
||||
model->appendRow({
|
||||
col0Item,
|
||||
col1Item,
|
||||
new QStandardItem(i == 0 ? tr("Running") : (i < 10 ? tr("Failed") : tr("Waiting"))),
|
||||
new QStandardItem("Environnment/Sky/Cloud/Cloudy-cloud"),
|
||||
new QStandardItem(QString::number(i)),
|
||||
new QStandardItem(i % 2 ? tr("Android") : tr("iPhone"))
|
||||
});
|
||||
}
|
||||
|
||||
ui->treeView->setModel(model);
|
||||
ui->treeView->setSortingEnabled(true);
|
||||
ui->treeView->setColumnWidth(0, 50);
|
||||
}
|
||||
|
||||
#include "StyleGallery/moc_mainwidget.cpp"
|
||||
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#ifndef MAINWIDGET_H
|
||||
#define MAINWIDGET_H
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QWidget>
|
||||
#endif
|
||||
|
||||
namespace Ui {
|
||||
class MainWidget;
|
||||
}
|
||||
|
||||
class MainWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWidget(QWidget *parent = 0);
|
||||
~MainWidget();
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
void initializeControls();
|
||||
void initializeItemViews();
|
||||
|
||||
signals:
|
||||
void reloadCSS();
|
||||
|
||||
private:
|
||||
Ui::MainWidget *ui;
|
||||
};
|
||||
|
||||
#endif // MAINWIDGET_H
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 744.09448819 1052.3622047"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="triangles.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="31.678384"
|
||||
inkscape:cx="175.07984"
|
||||
inkscape:cy="551.37808"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="58"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="fill:#cccccc;fill-rule:evenodd;stroke:#9d9e9f;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1;opacity:1"
|
||||
id="path3344"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="380"
|
||||
sodipodi:cy="403.79077"
|
||||
sodipodi:r1="243.10912"
|
||||
sodipodi:r2="121.55456"
|
||||
sodipodi:arg1="0.51623067"
|
||||
sodipodi:arg2="1.5634282"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 591.42857,523.79077 380.89562,525.34203 170.36266,526.89329 274.28571,343.79077 378.20876,160.68825 484.81867,342.23951 Z"
|
||||
inkscape:transform-center-x="0.016954397"
|
||||
inkscape:transform-center-y="0.65189465"
|
||||
transform="matrix(-0.01892764,0,0,-0.01086489,180.59057,495.21492)"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:1;fill:#737475;fill-opacity:1;fill-rule:evenodd;stroke:#575859;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path3344-5"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="380"
|
||||
sodipodi:cy="403.79077"
|
||||
sodipodi:r1="243.10912"
|
||||
sodipodi:r2="121.55456"
|
||||
sodipodi:arg1="0.51623067"
|
||||
sodipodi:arg2="1.5634282"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 591.42857,523.79077 380.89562,525.34203 170.36266,526.89329 274.28571,343.79077 378.20876,160.68825 484.81867,342.23951 Z"
|
||||
inkscape:transform-center-x="0.016954397"
|
||||
inkscape:transform-center-y="0.65189465"
|
||||
transform="matrix(-0.01892764,0,0,-0.01086489,185.09108,503.38349)"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:1;fill:#323334;fill-opacity:1;fill-rule:evenodd;stroke:#959595;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path3344-5-8"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="380"
|
||||
sodipodi:cy="403.79077"
|
||||
sodipodi:r1="243.10912"
|
||||
sodipodi:r2="121.55456"
|
||||
sodipodi:arg1="0.51623067"
|
||||
sodipodi:arg2="1.5634282"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 591.42857,523.79077 380.89562,525.34203 170.36266,526.89329 274.28571,343.79077 378.20876,160.68825 484.81867,342.23951 Z"
|
||||
inkscape:transform-center-x="0.016954397"
|
||||
inkscape:transform-center-y="0.65189465"
|
||||
transform="matrix(-0.01892764,0,0,-0.01086489,170.507,509.8342)"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-filename="C:\d\projects\amazon-style\img\triangle3.png" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:1;fill:#323334;fill-opacity:1;fill-rule:evenodd;stroke:#959595;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path3344-5-1"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="380"
|
||||
sodipodi:cy="403.79077"
|
||||
sodipodi:r1="243.10912"
|
||||
sodipodi:r2="121.55456"
|
||||
sodipodi:arg1="0.51623067"
|
||||
sodipodi:arg2="1.5634282"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 591.42857,523.79077 380.89562,525.34203 170.36266,526.89329 274.28571,343.79077 378.20876,160.68825 484.81867,342.23951 Z"
|
||||
inkscape:transform-center-x="-0.0169559"
|
||||
inkscape:transform-center-y="-0.65188753"
|
||||
transform="matrix(0.01892764,0,0,0.01086489,156.12199,496.40855)"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-filename="C:\d\projects\amazon-style\img\double_triangles.png" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.2 KiB |
@ -1,25 +0,0 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
set(FILES
|
||||
StyleGallery/ConditionGroupWidget.cpp
|
||||
StyleGallery/ConditionGroupWidget.h
|
||||
StyleGallery/ConditionWidget.cpp
|
||||
StyleGallery/ConditionWidget.h
|
||||
StyleGallery/DeploymentsWidget.cpp
|
||||
StyleGallery/DeploymentsWidget.h
|
||||
StyleGallery/deploymentswidget.ui
|
||||
StyleGallery/main.cpp
|
||||
StyleGallery/mainwidget.cpp
|
||||
StyleGallery/mainwidget.h
|
||||
StyleGallery/mainwidget.ui
|
||||
StyleGallery/MyCombo.cpp
|
||||
StyleGallery/MyCombo.h
|
||||
StyleGallery/ViewportTitleDlg.cpp
|
||||
StyleGallery/ViewportTitleDlg.h
|
||||
StyleGallery/ViewportTitleDlg.ui
|
||||
)
|
||||
Loading…
Reference in New Issue