mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-03 10:47:47 +01:00
Remove code.
This commit is contained in:
parent
5921b6466a
commit
f60489aa02
@ -28,9 +28,10 @@
|
||||
#include <QDateTime>
|
||||
|
||||
|
||||
// Represents single enclosure
|
||||
struct Enclosure {
|
||||
QString m_mimeType;
|
||||
QString m_url;
|
||||
QString m_mimeType;
|
||||
|
||||
explicit Enclosure(const QString &url = QString(), const QString &mime = QString()) : m_url(url), m_mimeType(mime) {
|
||||
}
|
||||
|
@ -200,65 +200,4 @@ class FeedsView : public QTreeView {
|
||||
int m_globalAutoUpdateRemainingInterval;
|
||||
};
|
||||
|
||||
/*
|
||||
class Delegate : public QStyledItemDelegate {
|
||||
public:
|
||||
explicit Delegate(FeedsView *view, QObject *parent = 0) : QStyledItemDelegate(parent) {
|
||||
this->view = view;
|
||||
}
|
||||
|
||||
// QAbstractItemDelegate interface
|
||||
public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
//QStyledItemDelegate::paint(painter, option, index);
|
||||
|
||||
QSize size = sizeHint(option, index);
|
||||
|
||||
int width = qMin(size.width(), option.rect.width()) - 4;
|
||||
int height = qMin(size.height(), option.rect.height()) - 4;
|
||||
int left = option.rect.left() + ((option.rect.width() - width) / 2.0);
|
||||
int top = option.rect.top() + ((option.rect.height() - height) / 2.0);
|
||||
|
||||
QRect target_rect = QRect(left, top, width, height);
|
||||
|
||||
painter->save();
|
||||
|
||||
//if ((option.state & QStyle::State_MouseOver) == 0 && (option.state & QStyle::State_Selected) == 0) {
|
||||
painter->setPen(QPen(QColor(Qt::black)));
|
||||
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||
painter->setBrush(QBrush(Qt::lightGray));
|
||||
//}
|
||||
|
||||
|
||||
|
||||
QString str = view->sourceModel()->data(view->model()->mapToSource(index), Qt::DisplayRole).toString();
|
||||
|
||||
painter->drawRect(target_rect);
|
||||
painter->drawText(target_rect, str, QTextOption(Qt::AlignCenter));
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
// QStyledItemDelegate interface
|
||||
public:
|
||||
QString displayText(const QVariant &value, const QLocale &locale) const
|
||||
{
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
// QAbstractItemDelegate interface
|
||||
public:
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
QSize base_size = QStyledItemDelegate::sizeHint(option, index);
|
||||
|
||||
return base_size;
|
||||
}
|
||||
|
||||
private:
|
||||
FeedsView *view;
|
||||
};
|
||||
*/
|
||||
|
||||
#endif // FEEDSVIEW_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user