"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/krenamelistview.cpp" between
krename-4.0.9.tar.gz and krename-4.90.90.tar.gz

About: KRename is a batch file-renamer (KDE).

krenamelistview.cpp  (krename-4.0.9):krenamelistview.cpp  (krename-4.90.90)
skipping to change at line 22 skipping to change at line 22
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
***************************************************************************/ ***************************************************************************/
#include "krenamelistview.h" #include "krenamelistview.h"
#include <kiconloader.h> #include <kiconloader.h>
#include <QPainter> KRenameListView::KRenameListView(QWidget *parent)
#include <QPaintEvent>
#include <QTextDocument>
KRenameListView::KRenameListView(QWidget* parent)
: QListView(parent), : QListView(parent),
m_label(NULL) m_label(nullptr)
{ {
} }
void KRenameListView::resizeEvent(QResizeEvent* e) void KRenameListView::resizeEvent(QResizeEvent *e)
{ {
QListView::resizeEvent( e ); QListView::resizeEvent(e);
positionLabel(); positionLabel();
} }
void KRenameListView::slotUpdateCount() void KRenameListView::slotUpdateCount()
{ {
this->positionLabel(); this->positionLabel();
} }
void KRenameListView::positionLabel() void KRenameListView::positionLabel()
{ {
if( m_label == NULL ) if (m_label == nullptr) {
{
return; return;
} }
if( !this->model() || this->model()->rowCount() ) if (!this->model() || this->model()->rowCount()) {
{
m_label->hide(); m_label->hide();
} } else {
else
{
int x = (width() - m_label->minimumSizeHint().width()) / 2; int x = (width() - m_label->minimumSizeHint().width()) / 2;
int y = (height() - m_label->minimumSizeHint().height()) / 2; int y = (height() - m_label->minimumSizeHint().height()) / 2;
m_label->setGeometry( x, y, m_label->setGeometry(x, y,
m_label->minimumSizeHint().width(), m_label->minim m_label->minimumSizeHint().width(), m_label->minimu
umSizeHint().height() ); mSizeHint().height());
m_label->show(); m_label->show();
} }
} }
 End of changes. 8 change blocks. 
18 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)