mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-05-04 04:13:49 +00:00
do not derive from qwidget in aggregates
This commit is contained in:
parent
33a41bb6c0
commit
0ee8d40ade
@ -26,8 +26,8 @@
|
||||
#include <utility>
|
||||
|
||||
|
||||
AbstractExtItemAggregator::AbstractExtItemAggregator(QWidget *_parent, QString _type)
|
||||
: QDialog(_parent)
|
||||
AbstractExtItemAggregator::AbstractExtItemAggregator(QObject *_parent, QString _type)
|
||||
: QObject(_parent)
|
||||
, ui(new Ui::AbstractExtItemAggregator)
|
||||
, m_type(std::move(_type))
|
||||
{
|
||||
|
@ -18,7 +18,6 @@
|
||||
#ifndef ABSTRACTEXTITEMAGGREGATOR_H
|
||||
#define ABSTRACTEXTITEMAGGREGATOR_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include "abstractextitem.h"
|
||||
@ -27,20 +26,15 @@
|
||||
|
||||
class QAbstractButton;
|
||||
class QListWidgetItem;
|
||||
namespace Ui
|
||||
{
|
||||
class AbstractExtItemAggregator;
|
||||
}
|
||||
|
||||
class AbstractExtItemAggregator : public QDialog
|
||||
class AbstractExtItemAggregator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QVariant configArgs READ configArgs WRITE setConfigArgs)
|
||||
Q_PROPERTY(QVariant type READ type)
|
||||
|
||||
public:
|
||||
explicit AbstractExtItemAggregator(QWidget *_parent, QString _type);
|
||||
~AbstractExtItemAggregator() override;
|
||||
explicit AbstractExtItemAggregator(QObject *_parent, QString _type);
|
||||
// methods
|
||||
void copyItem();
|
||||
template <class T> void createItem()
|
||||
|
@ -31,7 +31,7 @@
|
||||
template <class T> class ExtItemAggregator : public AbstractExtItemAggregator
|
||||
{
|
||||
public:
|
||||
explicit ExtItemAggregator(QWidget *_parent, const QString &_type)
|
||||
explicit ExtItemAggregator(QObject *_parent, const QString &_type)
|
||||
: AbstractExtItemAggregator(_parent, _type)
|
||||
{
|
||||
qSetMessagePattern(AWDebug::LOG_FORMAT);
|
||||
@ -57,7 +57,7 @@ public:
|
||||
void editItems()
|
||||
{
|
||||
repaintList();
|
||||
int ret = exec();
|
||||
auto ret = exec();
|
||||
qCInfo(LOG_LIB) << "Dialog returns" << ret;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user