Add RDLabel, an expanded QLabel

This commit is contained in:
baldurk
2016-10-03 17:41:01 +02:00
parent 7ec3049844
commit ca8cc98be6
5 changed files with 49 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
#include "RDLabel.h"
RDLabel::RDLabel(QWidget *parent) : QLabel(parent)
{
}
RDLabel::~RDLabel()
{
}
void RDLabel::mousePressEvent(QMouseEvent *event)
{
emit(clicked());
}
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#include <QLabel>
class RDLabel : public QLabel
{
private:
Q_OBJECT
public:
explicit RDLabel(QWidget *parent = 0);
~RDLabel();
signals:
void clicked();
public slots:
protected:
void mousePressEvent(QMouseEvent *event);
};
+4 -2
View File
@@ -92,7 +92,8 @@ SOURCES += Code/main.cpp \
Code/Core.cpp \
Widgets/RDLineEdit.cpp \
3rdparty/flowlayout/FlowLayout.cpp \
Widgets/ResourcePreview.cpp
Widgets/ResourcePreview.cpp \
Widgets/RDLabel.cpp
HEADERS += Windows/MainWindow.h \
Windows/EventBrowser.h \
@@ -106,7 +107,8 @@ HEADERS += Windows/MainWindow.h \
Code/RenderManager.h \
Widgets/RDLineEdit.h \
3rdparty/flowlayout/FlowLayout.h \
Widgets/ResourcePreview.h
Widgets/ResourcePreview.h \
Widgets/RDLabel.h
FORMS += Windows/MainWindow.ui \
Windows/EventBrowser.ui \
+3
View File
@@ -280,6 +280,7 @@
<ClCompile Include="generated\moc_Core.cpp" />
<ClCompile Include="generated\moc_CustomPaintWidget.cpp" />
<ClCompile Include="generated\moc_EventBrowser.cpp" />
<ClCompile Include="generated\moc_RDLabel.cpp" />
<ClCompile Include="generated\moc_RDLineEdit.cpp" />
<ClCompile Include="generated\moc_MainWindow.cpp" />
<ClCompile Include="generated\moc_ResourcePreview.cpp" />
@@ -289,6 +290,7 @@
<ClCompile Include="generated\moc_ToolWindowManagerWrapper.cpp" />
<ClCompile Include="generated\qrc_resources.cpp" />
<ClCompile Include="Widgets\ResourcePreview.cpp" />
<ClCompile Include="Widgets\RDLabel.cpp" />
<ClCompile Include="Windows\AboutDialog.cpp" />
<ClCompile Include="Code\Core.cpp" />
<ClCompile Include="Widgets\CustomPaintWidget.cpp" />
@@ -318,6 +320,7 @@
<ClInclude Include="generated\ui_ResourcePreview.h" />
<ClInclude Include="generated\ui_TextureViewer.h" />
<ClInclude Include="Widgets\ResourcePreview.h" />
<ClInclude Include="Widgets\RDLabel.h" />
<ClInclude Include="Windows\AboutDialog.h" />
<ClInclude Include="Code\Core.h" />
<ClInclude Include="Widgets\CustomPaintWidget.h" />
@@ -141,6 +141,12 @@
<ClCompile Include="generated\moc_ResourcePreview.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="Widgets\RDLabel.cpp">
<Filter>Widgets</Filter>
</ClCompile>
<ClCompile Include="generated\moc_RDLabel.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="3rdparty\flowlayout\FlowLayout.h">
@@ -185,6 +191,9 @@
<ClInclude Include="generated\ui_ResourcePreview.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="Widgets\RDLabel.h">
<Filter>Widgets</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="resources.qrc">