Wladimir J. van der Laan
14 years ago
5 changed files with 199 additions and 6 deletions
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
#include "TransactionTableModel.h" |
||||
|
||||
TransactionTableModel::TransactionTableModel(QObject *parent): |
||||
QAbstractTableModel(parent) |
||||
{ |
||||
columns << "Status" << "Date" << "Description" << "Debit" << "Credit"; |
||||
} |
||||
|
||||
int TransactionTableModel::rowCount(const QModelIndex &parent) const |
||||
{ |
||||
Q_UNUSED(parent); |
||||
return 5; |
||||
} |
||||
|
||||
int TransactionTableModel::columnCount(const QModelIndex &parent) const |
||||
{ |
||||
Q_UNUSED(parent); |
||||
return columns.length(); |
||||
} |
||||
|
||||
QVariant TransactionTableModel::data(const QModelIndex &index, int role) const |
||||
{ |
||||
if(!index.isValid()) |
||||
return QVariant(); |
||||
|
||||
if(role == Qt::DisplayRole) |
||||
{ |
||||
/* index.row(), index.column() */ |
||||
/* Return QString */ |
||||
return QString("test"); |
||||
} |
||||
return QVariant(); |
||||
} |
||||
|
||||
QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientation, int role) const |
||||
{ |
||||
if(role != Qt::DisplayRole) |
||||
return QVariant(); |
||||
|
||||
if(orientation == Qt::Horizontal) |
||||
{ |
||||
return columns[section]; |
||||
} |
||||
return QVariant(); |
||||
} |
||||
|
||||
Qt::ItemFlags TransactionTableModel::flags(const QModelIndex &index) const |
||||
{ |
||||
if (!index.isValid()) |
||||
return Qt::ItemIsEnabled; |
||||
|
||||
return QAbstractTableModel::flags(index); |
||||
} |
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
#ifndef H_TRANSACTIONTABLEMODEL |
||||
#define H_TRANSACTIONTABLEMODEL |
||||
|
||||
#include <QAbstractTableModel> |
||||
#include <QStringList> |
||||
|
||||
class TransactionTableModel : public QAbstractTableModel |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
TransactionTableModel(QObject *parent = 0); |
||||
|
||||
int rowCount(const QModelIndex &parent) const; |
||||
int columnCount(const QModelIndex &parent) const; |
||||
QVariant data(const QModelIndex &index, int role) const; |
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const; |
||||
Qt::ItemFlags flags(const QModelIndex &index) const; |
||||
private: |
||||
QStringList columns; |
||||
}; |
||||
|
||||
#endif |
||||
|
@ -0,0 +1,113 @@
@@ -0,0 +1,113 @@
|
||||
<!DOCTYPE QtCreatorProject> |
||||
<qtcreator> |
||||
<data> |
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable> |
||||
<value type="int">0</value> |
||||
</data> |
||||
<data> |
||||
<variable>ProjectExplorer.Project.EditorSettings</variable> |
||||
<valuemap type="QVariantMap"> |
||||
<value key="EditorConfiguration.Codec" type="QByteArray">System</value> |
||||
</valuemap> |
||||
</data> |
||||
<data> |
||||
<variable>ProjectExplorer.Project.Target.0</variable> |
||||
<valuemap type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value> |
||||
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value> |
||||
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value> |
||||
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap"> |
||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value> |
||||
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/> |
||||
</valuemap> |
||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value> |
||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value> |
||||
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/> |
||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value> |
||||
</valuemap> |
||||
<value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value> |
||||
<valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value> |
||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value> |
||||
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"> |
||||
<value type="QString">clean</value> |
||||
</valuelist> |
||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value> |
||||
</valuemap> |
||||
<value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value> |
||||
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value> |
||||
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/store/orion/projects/bitcoin/bitcoin-qt</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value> |
||||
</valuemap> |
||||
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap"> |
||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value> |
||||
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/> |
||||
</valuemap> |
||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value> |
||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value> |
||||
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/> |
||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value> |
||||
</valuemap> |
||||
<value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value> |
||||
<valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value> |
||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value> |
||||
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"> |
||||
<value type="QString">clean</value> |
||||
</valuelist> |
||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value> |
||||
</valuemap> |
||||
<value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value> |
||||
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value> |
||||
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/store/orion/projects/bitcoin/bitcoin-qt</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value> |
||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value> |
||||
</valuemap> |
||||
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value> |
||||
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap"> |
||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">bitcoin</value> |
||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value> |
||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value> |
||||
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/> |
||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">bitcoin.pro</value> |
||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value> |
||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value> |
||||
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/> |
||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value> |
||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value> |
||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value> |
||||
</valuemap> |
||||
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value> |
||||
</valuemap> |
||||
</data> |
||||
<data> |
||||
<variable>ProjectExplorer.Project.TargetCount</variable> |
||||
<value type="int">1</value> |
||||
</data> |
||||
<data> |
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
||||
<value type="int">4</value> |
||||
</data> |
||||
</qtcreator> |
Loading…
Reference in new issue