Restructured locations of source.
This commit is contained in:
parent
78a4c6d730
commit
7c4e8e95e8
151 changed files with 1 additions and 0 deletions
39
src/pglab/RolesTableModel.h
Normal file
39
src/pglab/RolesTableModel.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef ROLESTABLEMODEL_H
|
||||
#define ROLESTABLEMODEL_H
|
||||
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
class PgAuthIdContainer;
|
||||
|
||||
/** Class for displaying the list of roles of a server in a QTableView
|
||||
*
|
||||
*/
|
||||
class RolesTableModel : public QAbstractTableModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum e_Columns : int { NameCol, SuperCol, InheritCol, CreateRoleCol,
|
||||
CreateDBCol, CanLoginCol, ReplicationCol,
|
||||
BypassRlsCol, ConnlimitCol, ValidUntilCol };
|
||||
|
||||
|
||||
|
||||
explicit RolesTableModel(QObject *parent);
|
||||
|
||||
void setRoleList(const PgAuthIdContainer* roles);
|
||||
|
||||
// Header:
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
// Basic functionality:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
const PgAuthIdContainer *m_roles = nullptr;
|
||||
};
|
||||
|
||||
|
||||
#endif // ROLESTABLEMODEL_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue