mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Merge branch 'cgmb-add-about-dialog'
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:
|
||||
|
||||
@@ -608,7 +608,7 @@
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -621,7 +621,7 @@
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -431,3 +431,4 @@ extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_InjectIntoProcess(uint3
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_TriggerExceptionHandler(void *exceptionPtrs, bool32 crashed);
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_LogText(const char *text);
|
||||
extern "C" RENDERDOC_API bool32 RENDERDOC_CC RENDERDOC_GetThumbnail(const char *filename, byte *buf, uint32_t &len);
|
||||
extern "C" RENDERDOC_API const char* RENDERDOC_CC RENDERDOC_GetVersionString();
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "core/core.h"
|
||||
#include "replay/replay_renderer.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "data/version.h"
|
||||
|
||||
// these entry points are for the replay/analysis side - not for the application.
|
||||
|
||||
@@ -235,6 +236,12 @@ extern "C" RENDERDOC_API void RENDERDOC_CC Camera_GetBasis(Camera *c, FloatVecto
|
||||
up->z = u.z;
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
const char* RENDERDOC_CC RENDERDOC_GetVersionString()
|
||||
{
|
||||
return RENDERDOC_VERSION_STRING;
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
void RENDERDOC_CC RENDERDOC_LogText(const char *text)
|
||||
{
|
||||
@@ -379,6 +386,7 @@ bool32 RENDERDOC_CC RENDERDOC_GetThumbnail(const char *filename, byte *buf, uint
|
||||
if(buf == NULL)
|
||||
{
|
||||
len = (uint32_t)thumblen;
|
||||
delete[] jpgbuf;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@
|
||||
this.label2.Size = new System.Drawing.Size(439, 122);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Baldur Karlsson\r\nbaldurk@baldurk.org\r\nhttps://github.com/baldurk/renderdoc\r\nCopy" +
|
||||
"right Baldur Karlsson 2015";
|
||||
"right Baldur Karlsson 2016";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// ok
|
||||
|
||||
Reference in New Issue
Block a user