sample qt application window

This commit is contained in:
georgemoralis 2022-10-27 12:09:56 +03:00
parent 4cb16a1478
commit 4ff04549c9
4 changed files with 94 additions and 26 deletions

View File

@ -1,5 +1,5 @@
#include "shadps4gui.h" #include "shadps4gui.h"
#include <QMessageBox>
shadps4gui::shadps4gui(QWidget *parent) shadps4gui::shadps4gui(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
{ {
@ -8,3 +8,8 @@ shadps4gui::shadps4gui(QWidget *parent)
shadps4gui::~shadps4gui() shadps4gui::~shadps4gui()
{} {}
void shadps4gui::installPKG()
{
QMessageBox::critical(this, "PKG ERROR", "Not yet", QMessageBox::Ok, 0);
}

View File

@ -11,6 +11,9 @@ public:
shadps4gui(QWidget *parent = nullptr); shadps4gui(QWidget *parent = nullptr);
~shadps4gui(); ~shadps4gui();
public slots:
void installPKG();
private: private:
Ui::shadps4guiClass ui; Ui::shadps4guiClass ui;
}; };

View File

@ -1,9 +1,7 @@
<UI version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>shadps4guiClass</class> <class>shadps4guiClass</class>
<widget class="QMainWindow" name="shadps4guiClass"> <widget class="QMainWindow" name="shadps4guiClass">
<property name="objectName" >
<string notr="true">shadps4guiClass</string>
</property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -13,10 +11,69 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>shadps4gui</string> <string>shadPS4</string>
</property> <widget class="QMenuBar" name="menuBar" /> <widget class="QToolBar" name="mainToolBar" /> <widget class="QWidget" name="centralWidget" /> <widget class="QStatusBar" name="statusBar" /> </property>
<widget class="QWidget" name="centralWidget">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget> </widget>
<layoutDefault spacing="6" margin="11" /> <widget class="QMenuBar" name="menuBar">
<pixmapfunction></pixmapfunction> <property name="geometry">
<connections/> <rect>
</UI> <x>0</x>
<y>0</y>
<width>600</width>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuOpen">
<property name="title">
<string>Open</string>
</property>
<addaction name="actionInstall_PKG"/>
</widget>
<addaction name="menuOpen"/>
</widget>
<action name="actionInstall_PKG">
<property name="text">
<string>Install PKG</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections>
<connection>
<sender>actionInstall_PKG</sender>
<signal>triggered()</signal>
<receiver>shadps4guiClass</receiver>
<slot>installPKG()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>299</x>
<y>199</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>installPKG()</slot>
<slot>installFW()</slot>
</slots>
</ui>

View File

@ -21,23 +21,26 @@
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier> <UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
<Extensions>ts</Extensions> <Extensions>ts</Extensions>
</Filter> </Filter>
<Filter Include="gui">
<UniqueIdentifier>{29ee17bd-9ad4-44e8-b1cd-b4be13ec6509}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="gui\shadps4gui.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="main.cpp"> <ClCompile Include="main.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
</ItemGroup> <ClCompile Include="gui\shadps4gui.cpp">
<ItemGroup> <Filter>gui</Filter>
<QtMoc Include="gui\shadps4gui.h"> </ClCompile>
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtUic Include="gui\shadps4gui.ui"> <QtUic Include="gui\shadps4gui.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
</ItemGroup> </ItemGroup>
<ItemGroup>
<QtMoc Include="gui\shadps4gui.h">
<Filter>gui</Filter>
</QtMoc>
</ItemGroup>
</Project> </Project>