chore: 格式化ElaWidgetTools代码
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
#include "ElaListViewPrivate.h"
|
||||
#include "ElaListViewStyle.h"
|
||||
#include "ElaScrollBar.h"
|
||||
ElaListView::ElaListView(QWidget* parent)
|
||||
: QListView(parent), d_ptr(new ElaListViewPrivate())
|
||||
{
|
||||
ElaListView::ElaListView(QWidget *parent) : QListView(parent), d_ptr(new ElaListViewPrivate()) {
|
||||
Q_D(ElaListView);
|
||||
d->q_ptr = this;
|
||||
setObjectName("ElaListView");
|
||||
@@ -23,37 +21,31 @@ ElaListView::ElaListView(QWidget* parent)
|
||||
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
}
|
||||
|
||||
ElaListView::~ElaListView()
|
||||
{
|
||||
ElaListView::~ElaListView() {
|
||||
Q_D(ElaListView);
|
||||
delete d->_listViewStyle;
|
||||
}
|
||||
|
||||
void ElaListView::setItemHeight(int itemHeight)
|
||||
{
|
||||
void ElaListView::setItemHeight(int itemHeight) {
|
||||
Q_D(ElaListView);
|
||||
if (itemHeight > 0)
|
||||
{
|
||||
if (itemHeight > 0) {
|
||||
d->_listViewStyle->setItemHeight(itemHeight);
|
||||
doItemsLayout();
|
||||
}
|
||||
}
|
||||
|
||||
int ElaListView::getItemHeight() const
|
||||
{
|
||||
int ElaListView::getItemHeight() const {
|
||||
Q_D(const ElaListView);
|
||||
return d->_listViewStyle->getItemHeight();
|
||||
}
|
||||
|
||||
void ElaListView::setIsTransparent(bool isTransparent)
|
||||
{
|
||||
void ElaListView::setIsTransparent(bool isTransparent) {
|
||||
Q_D(ElaListView);
|
||||
d->_listViewStyle->setIsTransparent(isTransparent);
|
||||
update();
|
||||
}
|
||||
|
||||
bool ElaListView::getIsTransparent() const
|
||||
{
|
||||
bool ElaListView::getIsTransparent() const {
|
||||
Q_D(const ElaListView);
|
||||
return d->_listViewStyle->getIsTransparent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user