kalarm
resourcemodelview.cpp
Go to the documentation of this file.
55 connect(resources, SIGNAL(signalResourceModified(AlarmResource*)), SLOT(updateResource(AlarmResource*)));
56 connect(resources, SIGNAL(standardResourceChange(CalEvent::Type)), SLOT(slotStandardChanged(CalEvent::Type)));
57 connect(resources, SIGNAL(resourceStatusChanged(AlarmResource*,AlarmResources::Change)), SLOT(slotStatusChanged(AlarmResource*,AlarmResources::Change)));
58 connect(resources, SIGNAL(resourceLoaded(AlarmResource*,bool)), SLOT(slotLoaded(AlarmResource*,bool)));
93 case CalEvent::ACTIVE: colour = KColorScheme(QPalette::Active).foreground(KColorScheme::NormalText).color(); break;
95 case CalEvent::TEMPLATE: colour = KColorScheme(QPalette::Active).foreground(KColorScheme::LinkText).color(); break;
119 QString disabled = resource->isWrongAlarmType() ? i18nc("@info/plain", "Disabled (wrong alarm type)") : i18nc("@info/plain", "Disabled");
342 return static_cast<ResourceModel*>(sourceModel())->resource(sourceModel()->index(sourceRow, 0))->alarmType() == mResourceType;
380 bool ResourceDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index)
390 QRect(option.rect.x() + textMargin, option.rect.y(), option.rect.width(), option.rect.height()));
408 Qt::CheckState state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked ? Qt::Unchecked : Qt::Checked);
520 int checkWidth = QApplication::style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt).width();
521 int left = spacing() + 3*margin + checkWidth + viewOptions().decorationSize.width(); // left offset of text
virtual bool editorEvent(QEvent *, QAbstractItemModel *, const QStyleOptionViewItem &, const QModelIndex &)
Definition: resourcemodelview.cpp:380
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: resourcemodelview.cpp:61
virtual QVariant data(const QModelIndex &, int role=Qt::DisplayRole) const
Definition: resourcemodelview.cpp:75
void removeResource(AlarmResource *)
Definition: resourcemodelview.cpp:248
virtual void mouseReleaseEvent(QMouseEvent *)
Definition: resourcemodelview.cpp:487
virtual bool setData(const QModelIndex &, const QVariant &value, int role=Qt::EditRole)
Definition: resourcemodelview.cpp:149
virtual Qt::ItemFlags flags(const QModelIndex &) const
Definition: resourcemodelview.cpp:186
virtual bool viewportEvent(QEvent *)
Definition: resourcemodelview.cpp:497
AlarmResource * resource(int row) const
Definition: resourcemodelview.cpp:348
static ResourceModel * instance(QObject *parent=0)
Definition: resourcemodelview.cpp:43
AlarmResource * resource(const QModelIndex &) const
Definition: resourcemodelview.cpp:194
ResourceFilterModel(QAbstractItemModel *baseModel, QObject *parent)
Definition: resourcemodelview.cpp:324
void notifyChange(const QModelIndex &)
Definition: resourcemodelview.cpp:204
static int warningContinueCancel(QWidget *parent, ButtonCode defaultButton, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const QString &dontAskAgainName=QString())
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: resourcemodelview.cpp:68
Definition: resourcemodelview.h:39
Definition: resourcemodelview.h:71
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
Definition: resourcemodelview.cpp:340
virtual void setModel(QAbstractItemModel *)
Definition: resourcemodelview.cpp:450
Definition: resourcemodelview.h:107
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.