kde-workspace/krunner/interfaces/quicksand/qs_statusbar.h
2014-11-13 19:30:51 +02:00

55 lines
1.5 KiB
C++

/*
* Copyright (C) 2007-2008 Ryan P. Bitanga <ryan.bitanga@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .
*/
#ifndef QS_STATUSBAR_H
#define QS_STATUSBAR_H
#include <QLabel>
namespace QuickSand {
/**
* A small label providing status bar functionality for QListViews
*/
class QsStatusBar : public QLabel
{
Q_OBJECT
public:
QsStatusBar(QWidget *parent = 0);
void paintEvent(QPaintEvent *);
/**
* Sets the total rows in the QListView
*/
void setTotalRows(int rows);
public Q_SLOTS:
/**
* Updates the current row index
*/
void slotCurrentRowChanged(int newRow);
private:
QString m_message;
int m_currentItem;
int m_totalItems;
};
} // namespace QuickSand
#endif