DiagramDesigner/diagramCavas/source/statusBar.cpp

22 lines
435 B
C++

#include <QLabel>
#include "statusBar.h"
StatusBar::StatusBar(QWidget *parent)
: QStatusBar(parent)
,m_pScaleLevel(nullptr)
{
m_pScaleLevel = new QLabel("当前级数:10",this);
m_pScaleLevel->setMinimumWidth(250);
addWidget(m_pScaleLevel);
}
StatusBar::~StatusBar()
{
}
void StatusBar::onScaleLevelChanged(double f)
{
m_pScaleLevel->setText(QString::fromWCharArray(L"当前级数:")+QString::number(f));
}