Giter VIP home page Giter VIP logo

qstditemmodel's People

Contributors

amdfxlucas avatar

Watchers

 avatar  avatar

qstditemmodel's Issues

do not longer confuse model != null with 'Item is contained in model'

it has to be possible to determine if an item with a given uuid is contained in a model
(that is to say, a direct or indirect child of the models root-node ) or not

unfortunately the legacy implementation of QStandardItem/Model confused this condition,
with the fact if an items 'model' pointer is null or not

because an items model pointer is almost never null, it could be convenient to add a method 'bool QStdItemModel::contains(unsigned long long int uuid )' to the model

or alternatively

Let the items themselves determine if they are contained inside the model which their model-pointer points to,
by following their parent-pointer upward until they reach nullptr -> if the last parent matches 'model->d_func()->root.data()'
they know their part of the model, their model pointer points to

create QStdItemModel-UndoCommands similar to QStdItem-UndoCmds

represent common model Actions such as Cut/Paste , Deletion , Quantity and DueDate-Editing as Model-UndoCommands.

this reduces code-duplication, between different Widgets, that use the same ContextMenuActions,
since all they have to do in their slots is to instantiate the corresponding ModelCommand.

create serialization for selected items

As of now, QStdItemModel::save( ) serializes the entire model (its root node).

This isn't always what we want.
i.e. whith hplan_model, we would like to save only parts of the production-schedule,
which are ready to be released

to enable this, create a method QStdItemModel::save(const QModelIndex& index)
that only serializes the Day/Week or Month-Item pointed to by index

write improved QModelIndex class

why hasn't QModelIndex got a method QStdItem* QModelIndex::item() ?
(when QStdItem has a method QModelIndex QStdItem::index() )
or QModelIndex QModelIndex::child()

implement cut-paste of items

i set-up the 'cut-paste' dev branch to implement cut-paste with model-items.
Cut and Paste are required to be undone and therefore implemented with command pattern.

implement reversible DragAndDrop between different models

As of now, QStdItemModel can only fully undo QAbstractItemView::InternalMove Drags,
where source and target are the same.
In order to support Drag and Drop accross widgets, i think it'll be neccessary to serialize the source and target model pointers
into the QMimeData

implement QAbstractItemModel move Actions

bool moveColumn(const QModelIndex &sourceParent, int sourceColumn, const QModelIndex &destinationParent, int destinationChild)

virtual bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild)

bool moveRow(const QModelIndex &sourceParent, int sourceRow, const QModelIndex &destinationParent, int destinationChild)

virtual bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.