2014-11-13 01:04:59 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2008 Aaron Seigo <aseigo@kde.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "<name>.h"
|
|
|
|
|
|
|
|
#include <<Native>>
|
|
|
|
|
|
|
|
#include "svg.h"
|
|
|
|
|
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
|
|
|
class <Name>Private
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
<Name>Private(<Name> *w)
|
|
|
|
: q(w),
|
2023-10-22 19:17:46 +03:00
|
|
|
svg(nullptr)
|
2014-11-13 01:04:59 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
<Name> *q;
|
|
|
|
};
|
|
|
|
|
|
|
|
<Name>::<Name>(QGraphicsWidget *parent)
|
|
|
|
: QGraphicsProxyWidget(parent),
|
|
|
|
d(new <Name>Private(this))
|
|
|
|
{
|
|
|
|
<Native>* native = new <Native>;
|
|
|
|
//TODO: forward signals
|
|
|
|
//connect(native, SIGNAL(()), this, SIGNAL(()));
|
|
|
|
setWidget(native);
|
|
|
|
native->setAttribute(Qt::WA_NoSystemBackground);
|
|
|
|
}
|
|
|
|
|
|
|
|
<Name>::~<Name>()
|
|
|
|
{
|
|
|
|
delete d;
|
|
|
|
}
|
|
|
|
|
|
|
|
void <Name>::setText(const QString &text)
|
|
|
|
{
|
2024-05-23 10:10:13 +03:00
|
|
|
nativeWidget()->setText(text);
|
2014-11-13 01:04:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
QString <Name>::text() const
|
|
|
|
{
|
2024-05-23 10:10:13 +03:00
|
|
|
return nativeWidget()->text();
|
2014-11-13 01:04:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
<Native>* <Name>::nativeWidget() const
|
|
|
|
{
|
|
|
|
return static_cast<<Native>*>(widget());
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Plasma
|
|
|
|
|
|
|
|
#include <<name>.moc>
|
|
|
|
|