mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 21:06:10 +00:00
7c7cb4083c
* Add status bar and display items count
27 lines
576 B
C++
27 lines
576 B
C++
#include "CutterTreeWidget.h"
|
|
#include "MainWindow.h"
|
|
|
|
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() {}
|