1 Star 0 Fork 0

uthelei/CodeLineCount

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
countcodeWidget.cpp 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
lei.he 提交于 2021-06-29 14:58 . 添加git代码统计
#include "countcodeWidget.h"
#include "treeview.h"
#include <QVBoxLayout>
#include <QFileIconProvider>
#include <QFile>
#include <QFileInfo>
CountCodeWidget::CountCodeWidget(QWidget *parent)
: QWidget(parent)
, m_treeView(new TreeView(this))
, m_bottomWidget(new QWidget(this))
{
}
CountCodeWidget::~CountCodeWidget()
{
}
void CountCodeWidget::initUi()
{
initForm();
initBottomWidget();
setLabelStyle();
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
mainLayout->addWidget(m_treeView);
mainLayout->addWidget(m_bottomWidget);
onClearData();
}
void CountCodeWidget::initForm()
{
}
void CountCodeWidget::initBottomWidget()
{
}
void CountCodeWidget::setLabelStyle()
{
}
void CountCodeWidget::onClearData()
{
}
QIcon CountCodeWidget::getIcon(QString filename)
{
QFileInfo file_info(filename);
QFileIconProvider file_icon;
QIcon icon = file_icon.icon(file_info);
return icon;
}
QString CountCodeWidget::getElidedText(QFont font, QString str, int MaxWidth)
{
if (str.isEmpty())
return "";
QFontMetrics fontWidth(font);
int width = fontWidth.width(str);
if (width >= MaxWidth)
str = fontWidth.elidedText(str, Qt::ElideRight, MaxWidth);
return str;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/uthelei/CodeLineCount.git
git@gitee.com:uthelei/CodeLineCount.git
uthelei
CodeLineCount
CodeLineCount
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385