2018-10-10 12:34:46 +00:00
|
|
|
#include "CutterTreeWidget.h"
|
2019-02-22 16:50:45 +00:00
|
|
|
#include "core/MainWindow.h"
|
2018-10-10 12:34:46 +00:00
|
|
|
|
|
|
|
CutterTreeWidget::CutterTreeWidget(QObject *parent) :
|
|
|
|
QObject(parent),
|
|
|
|
bar(nullptr)
|
|
|
|
{}
|
|
|
|
|
|
|
|
void CutterTreeWidget::addStatusBar(QVBoxLayout *pos)
|
|
|
|
{
|
|
|
|
if(!bar) {
|
|
|
|
bar = new QStatusBar;
|
|
|
|
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
|
|
|
|
bar->setSizePolicy(sizePolicy);
|
|
|
|
pos->addWidget(bar);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CutterTreeWidget::showItemsNumber(int count)
|
|
|
|
{
|
|
|
|
if(bar){
|
|
|
|
bar->showMessage(tr("%1 Items").arg(count));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CutterTreeWidget::~CutterTreeWidget() {}
|