mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add about dialog to qrenderdoc
This commit is contained in:
@@ -15,6 +15,8 @@ Core::Core(QString paramFilename, QString remoteHost, uint32_t remoteIdent, bool
|
||||
|
||||
memset(&m_APIProps, 0, sizeof(m_APIProps));
|
||||
|
||||
qApp->setApplicationVersion(RENDERDOC_GetVersionString());
|
||||
|
||||
m_MainWindow = new MainWindow(this);
|
||||
m_MainWindow->show();
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "AboutDialog.h"
|
||||
#include "ui_AboutDialog.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->version->setText("Version v" + qApp->applicationVersion());
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef ABOUTDIALOG_H
|
||||
#define ABOUTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AboutDialog;
|
||||
}
|
||||
|
||||
class AboutDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AboutDialog(QWidget *parent = 0);
|
||||
~AboutDialog();
|
||||
|
||||
private:
|
||||
Ui::AboutDialog *ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutDialog</class>
|
||||
<widget class="QDialog" name="AboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>518</width>
|
||||
<height>302</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About RenderDoc</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="letterhead">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../resources.qrc">:/Resources/128.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="version">
|
||||
<property name="text">
|
||||
<string>Version v0.00</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="owner">
|
||||
<property name="text">
|
||||
<string>Baldur Karsson</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="email">
|
||||
<property name="text">
|
||||
<string><a href='mailto:baldurk@baldurk.org'>baldurk@baldurk.org</a></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="website">
|
||||
<property name="text">
|
||||
<string><a href='https://github.com/baldurk/renderdoc'>https://github.com/baldurk/renderdoc</a></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="copyright">
|
||||
<property name="text">
|
||||
<string>Copyright Baldur Karlsson 2016</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>AboutDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>AboutDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "MainWindow.h"
|
||||
#include "Windows/AboutDialog.h"
|
||||
#include "EventBrowser.h"
|
||||
#include "TextureViewer.h"
|
||||
#include "ui_MainWindow.h"
|
||||
@@ -52,3 +53,9 @@ void MainWindow::on_action_Open_Log_triggered()
|
||||
thread->start();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_action_About_triggered()
|
||||
{
|
||||
AboutDialog about(this);
|
||||
about.exec();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class MainWindow : public QMainWindow
|
||||
|
||||
private slots:
|
||||
void on_action_Exit_triggered();
|
||||
|
||||
void on_action_About_triggered();
|
||||
void on_action_Open_Log_triggered();
|
||||
|
||||
private:
|
||||
|
||||
@@ -65,6 +65,7 @@ SOURCES += Code/main.cpp \
|
||||
Windows/MainWindow.cpp \
|
||||
Windows/EventBrowser.cpp \
|
||||
Windows/TextureViewer.cpp \
|
||||
Windows/AboutDialog.cpp \
|
||||
Widgets/CustomPaintWidget.cpp \
|
||||
3rdparty/toolwindowmanager/ToolWindowManager.cpp \
|
||||
3rdparty/toolwindowmanager/ToolWindowManagerArea.cpp \
|
||||
@@ -77,6 +78,7 @@ SOURCES += Code/main.cpp \
|
||||
HEADERS += Windows/MainWindow.h \
|
||||
Windows/EventBrowser.h \
|
||||
Windows/TextureViewer.h \
|
||||
Windows/AboutDialog.h \
|
||||
Widgets/CustomPaintWidget.h \
|
||||
3rdparty/toolwindowmanager/ToolWindowManager.h \
|
||||
3rdparty/toolwindowmanager/ToolWindowManagerArea.h \
|
||||
@@ -88,7 +90,8 @@ HEADERS += Windows/MainWindow.h \
|
||||
|
||||
FORMS += Windows/MainWindow.ui \
|
||||
Windows/EventBrowser.ui \
|
||||
Windows/TextureViewer.ui
|
||||
Windows/TextureViewer.ui \
|
||||
Windows/AboutDialog.ui
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
|
||||
Reference in New Issue
Block a user