1 #include "CutterTreeWidget.h"
2 #include "core/MainWindow.h"
3 
CutterTreeWidget(QObject * parent)4 CutterTreeWidget::CutterTreeWidget(QObject *parent) :
5     QObject(parent),
6     bar(nullptr)
7 {}
8 
addStatusBar(QVBoxLayout * pos)9 void CutterTreeWidget::addStatusBar(QVBoxLayout *pos)
10 {
11     if(!bar) {
12         bar = new QStatusBar;
13         QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
14         bar->setSizePolicy(sizePolicy);
15         pos->addWidget(bar);
16     }
17 }
18 
showItemsNumber(int count)19 void CutterTreeWidget::showItemsNumber(int count)
20 {
21     if(bar){
22         bar->showMessage(tr("%1 Items").arg(count));
23     }
24 }
25 
showStatusBar(bool show)26 void CutterTreeWidget::showStatusBar(bool show)
27 {
28     bar->setVisible(show);
29 }
30 
~CutterTreeWidget()31 CutterTreeWidget::~CutterTreeWidget() {}
32