Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dridk/arraydatamodel
ArrayDataModel for Qt. Same than blackberry 10 API but based on QAbstractItemModel
https://github.com/dridk/arraydatamodel
Last synced: 19 days ago
JSON representation
ArrayDataModel for Qt. Same than blackberry 10 API but based on QAbstractItemModel
- Host: GitHub
- URL: https://github.com/dridk/arraydatamodel
- Owner: dridk
- Created: 2013-10-09T13:59:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-09T15:04:03.000Z (about 11 years ago)
- Last Synced: 2024-05-01T21:19:18.081Z (8 months ago)
- Language: C++
- Size: 113 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ArrayDataModel
==============ArrayDataModel for Qt. Same than [blackberry 10 ArrayDataModel](http://developer.blackberry.com/native/reference/cascades/bb__cascades__arraydatamodel.html) but based on QAbstractItemModel
## API
### public slots
* void append (const QVariantList &values);
* void append (const QVariant &value);
* void clear ();
* void insert (int i, const QVariantList &values);
* void insert (int i, const QVariant &value);
* void move (int from, int to);
* void removeAt (int i);
* void replace (int i, const QVariant &value);
* void swap (int i, int j);### public invokable
* int indexOf (const QVariant &value, int from=0) const;
* bool isEmpty () const;
* int size () const;
* QVariant value (int i) const;
* QVariant value (int i, const QVariant &defaultValue) const;## EXAMPLE
int main(int argc, char **argv)
{
QApplication app(argc,argv);
QListView * view = new QListView;
ArrayDataModel * model = new ArrayDataModel;
view->setModel(model);
view->show();
model->append("salut");
model->append(54);
model->append(QDate::currentDateTime());
app.exec();
}