mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-21 01:29:58 +00:00
create initialization skeleton
This commit is contained in:
@ -17,13 +17,41 @@
|
||||
|
||||
#include "awesome-widget.h"
|
||||
|
||||
#include <QGraphicsLinearLayout>
|
||||
//#include <QThread>
|
||||
|
||||
#include "customlabel.h"
|
||||
#include <pdebug/pdebug.h>
|
||||
|
||||
|
||||
void AwesomeWidget::reinit()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
mainLayout = new QGraphicsLinearLayout();
|
||||
mainLayout->setContentsMargins(1, 1, 1, 1);
|
||||
setLayout(mainLayout);
|
||||
|
||||
if (configuration[QString("background")].toInt() == 0)
|
||||
setBackgroundHints(NoBackground);
|
||||
else
|
||||
setBackgroundHints(DefaultBackground);
|
||||
if (configuration[QString("layout")].toInt() == 0)
|
||||
mainLayout->setOrientation(Qt::Horizontal);
|
||||
else
|
||||
mainLayout->setOrientation(Qt::Vertical);
|
||||
if (configuration[QString("leftStretch")].toInt() == 2)
|
||||
mainLayout->addStretch(1);
|
||||
if (configuration[QString("popup")].toInt() == 0)
|
||||
textLabel->setPopupEnabled(true);
|
||||
mainLayout->addItem(textLabel);
|
||||
if (configuration[QString("rightStretch")].toInt() == 2)
|
||||
mainLayout->addStretch(1);
|
||||
|
||||
values[QString("netdev")] = getNetworkDevice();
|
||||
// thread()->wait(60000);
|
||||
connectToEngine();
|
||||
resize(10, 10);
|
||||
}
|
||||
|
||||
|
||||
@ -31,3 +59,9 @@ void AwesomeWidget::updateText()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
}
|
||||
|
||||
|
||||
void AwesomeWidget::updateTooltip()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
}
|
||||
|
Reference in New Issue
Block a user