-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start working on extensions tab in settings.
- Loading branch information
Showing
15 changed files
with
551 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "settingsdialogextensionrow.h" | ||
|
||
#include "ui_settingsdialogextensionrow.h" | ||
|
||
using namespace MOBase; | ||
|
||
ExtensionListItemWidget::ExtensionListItemWidget(const IExtension& extension) | ||
: ui{new Ui::ExtensionListItemWidget()}, m_extension{&extension} | ||
{ | ||
ui->setupUi(this); | ||
|
||
QIcon icon = style()->standardIcon(QStyle::SP_DialogOkButton); | ||
ui->extensionIcon->setPixmap(extension.metadata().icon().pixmap(QSize(48, 48))); | ||
ui->extensionName->setText(extension.metadata().name()); | ||
|
||
ui->extensionDescription->setText(extension.metadata().description()); | ||
ui->extensionAuthor->setText(extension.metadata().author().name()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef SETTINGSDIALOGEXTENSIONROW_H | ||
#define SETTINGSDIALOGEXTENSIONROW_H | ||
|
||
#include <QWidget> | ||
|
||
#include "extension.h" | ||
|
||
namespace Ui | ||
{ | ||
class ExtensionListItemWidget; | ||
} | ||
|
||
class ExtensionListItemWidget : public QWidget | ||
{ | ||
public: | ||
ExtensionListItemWidget(MOBase::IExtension const& extension); | ||
|
||
private: | ||
Ui::ExtensionListItemWidget* ui; | ||
const MOBase::IExtension* m_extension; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>ExtensionListItemWidget</class> | ||
<widget class="QWidget" name="ExtensionListItemWidget"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>250</width> | ||
<height>60</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
<property name="leftMargin"> | ||
<number>2</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>2</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>2</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>2</number> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="extensionIcon"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>48</width> | ||
<height>48</height> | ||
</size> | ||
</property> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>45</width> | ||
<height>48</height> | ||
</size> | ||
</property> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<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>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<property name="spacing"> | ||
<number>2</number> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="extensionName"> | ||
<property name="font"> | ||
<font> | ||
<pointsize>10</pointsize> | ||
<bold>true</bold> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="extensionDescription"> | ||
<property name="font"> | ||
<font> | ||
<pointsize>8</pointsize> | ||
<italic>true</italic> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QLabel" name="extensionAuthor"> | ||
<property name="font"> | ||
<font> | ||
<pointsize>8</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
Oops, something went wrong.