KWin
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
KWin::RuleBookModel Class Reference

#include <rulebookmodel.h>

Inheritance diagram for KWin::RuleBookModel:

Public Types

enum  { DescriptionRole = Qt::DisplayRole }
 

Public Member Functions

 RuleBookModel (QObject *parent=nullptr)
 
 ~RuleBookModel ()
 
QHash< int, QByteArray > roleNames () const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
bool insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
bool moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override
 
QString descriptionAt (int row) const
 
void setDescriptionAt (int row, const QString &description)
 
RuleSettings * ruleSettingsAt (int row) const
 
void setRuleSettingsAt (int row, const RuleSettings &settings)
 
void load ()
 
void save ()
 
bool isSaveNeeded ()
 

Static Public Member Functions

static void copySettingsTo (RuleSettings *dest, const RuleSettings &source)
 

Detailed Description

Definition at line 17 of file rulebookmodel.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DescriptionRole 

Definition at line 22 of file rulebookmodel.h.

Constructor & Destructor Documentation

◆ RuleBookModel()

KWin::RuleBookModel::RuleBookModel ( QObject * parent = nullptr)
explicit

Definition at line 12 of file rulebookmodel.cpp.

◆ ~RuleBookModel()

KWin::RuleBookModel::~RuleBookModel ( )

Definition at line 18 of file rulebookmodel.cpp.

Member Function Documentation

◆ copySettingsTo()

void KWin::RuleBookModel::copySettingsTo ( RuleSettings * dest,
const RuleSettings & source )
static

Definition at line 184 of file rulebookmodel.cpp.

◆ data()

QVariant KWin::RuleBookModel::data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
override

Definition at line 34 of file rulebookmodel.cpp.

◆ descriptionAt()

QString KWin::RuleBookModel::descriptionAt ( int row) const

Definition at line 132 of file rulebookmodel.cpp.

◆ insertRows()

bool KWin::RuleBookModel::insertRows ( int row,
int count,
const QModelIndex & parent = QModelIndex() )
override

Definition at line 78 of file rulebookmodel.cpp.

◆ isSaveNeeded()

bool KWin::RuleBookModel::isSaveNeeded ( )

Definition at line 179 of file rulebookmodel.cpp.

◆ load()

void KWin::RuleBookModel::load ( )

Definition at line 165 of file rulebookmodel.cpp.

◆ moveRows()

bool KWin::RuleBookModel::moveRows ( const QModelIndex & sourceParent,
int sourceRow,
int count,
const QModelIndex & destinationParent,
int destinationChild )
override

Definition at line 109 of file rulebookmodel.cpp.

◆ removeRows()

bool KWin::RuleBookModel::removeRows ( int row,
int count,
const QModelIndex & parent = QModelIndex() )
override

Definition at line 94 of file rulebookmodel.cpp.

◆ roleNames()

QHash< int, QByteArray > KWin::RuleBookModel::roleNames ( ) const
override

Definition at line 22 of file rulebookmodel.cpp.

◆ rowCount()

int KWin::RuleBookModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
override

Definition at line 29 of file rulebookmodel.cpp.

◆ ruleSettingsAt()

RuleSettings * KWin::RuleBookModel::ruleSettingsAt ( int row) const

Definition at line 138 of file rulebookmodel.cpp.

◆ save()

void KWin::RuleBookModel::save ( )

Definition at line 174 of file rulebookmodel.cpp.

◆ setData()

bool KWin::RuleBookModel::setData ( const QModelIndex & index,
const QVariant & value,
int role )
override

Definition at line 54 of file rulebookmodel.cpp.

◆ setDescriptionAt()

void KWin::RuleBookModel::setDescriptionAt ( int row,
const QString & description )

Definition at line 144 of file rulebookmodel.cpp.

◆ setRuleSettingsAt()

void KWin::RuleBookModel::setRuleSettingsAt ( int row,
const RuleSettings & settings )

Definition at line 156 of file rulebookmodel.cpp.


The documentation for this class was generated from the following files: