Added a few more dialogs and models
This commit is contained in:
1 parent
2a21ffb8c7
commit
b8c62a923e
79 files changed
+2748
-326
No files matched your search
@@ -0,0 +1,46 @@
|
||||
#include "constantsmodel.h"
|
||||
|
||||
#include "projectcontainer.h"
|
||||
|
||||
namespace {
|
||||
enum {
|
||||
ColumnName,
|
||||
ColumnValue,
|
||||
NumberOfColumns
|
||||
};
|
||||
}
|
||||
|
||||
ConstantsModel::ConstantsModel(ProjectContainer &project, QObject *parent) :
|
||||
QAbstractTableModel{parent},
|
||||
m_project{project}
|
||||
{
|
||||
}
|
||||
|
||||
int ConstantsModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ConstantsModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
return NumberOfColumns;
|
||||
}
|
||||
|
||||
QVariant ConstantsModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
QVariant ConstantsModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (orientation != Qt::Horizontal || (role != Qt::DisplayRole && role != Qt::EditRole))
|
||||
return {};
|
||||
|
||||
switch (section)
|
||||
{
|
||||
case ColumnName: return tr("Name");
|
||||
case ColumnValue: return tr("Value");
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
Reference in new issue
Block a user