![]() |
Agroeye
1.0
|
Public Member Functions | |
def | __init__ (self, parent=None) |
def | data (self, index, role=Qt.DisplayRole) |
Returns the data stored under the given role for the item referred to by the index. More... | |
def | dropMimeData (self, data, action, row, column, parent) |
Handles the data supplied by a drag and drop operation that ended with the given action. More... | |
def | flags (self, index) |
Returns flags for the given index. More... | |
def | insertRows (self, file, position, count=1, index=QModelIndex()) |
Insert count file into the model before the given position. More... | |
def | editRows (self, row, count, parent=QModelIndex()) |
Insert row into the model after the given position in drag and drop operation. More... | |
def | mimeData (self, indexes) |
Returns an object that contains serialized items of data corresponding to the list of indexes specified. More... | |
def | mimeTypes (self) |
Returns a list of MIME types that can be used to describe a list of model indexes. More... | |
def | removeRows (self, row, count=1, parent=QModelIndex()) |
Removes count rows starting with the given row under parent parent from the model. More... | |
def | rowCount (self, parent=QModelIndex()) |
Returns the number of rows under the given parent. More... | |
def | setData (self, index, value, role=Qt.EditRole) |
Sets the role data for the item at index to value. More... | |
def | supportedDropActions (self) |
Sets the supported drag actions for the items in the model. More... | |
def | getFiles (self) |
Returns item into model. More... | |
def | isVector (self, index=QModelIndex) |
Returns True if selected file is vector; otherwise returns False. More... | |
Public Attributes | |
parent | |
files | |
Static Public Attributes | |
string | Mimetype = 'application/x-qabstractmodeldatalist' |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.__init__ | ( | self, | |
parent = None |
|||
) |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.data | ( | self, | |
index, | |||
role = Qt.DisplayRole |
|||
) |
Returns the data stored under the given role for the item referred to by the index.
If you do not have a value to return, return an invalid QVariant.
index | Index of item in the model. |
role | Role for item which is used by the view to indicate to the model which type of data it needs. By default the key data to be rendered in the form of text (QString). |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.dropMimeData | ( | self, | |
data, | |||
action, | |||
row, | |||
column, | |||
parent | |||
) |
Handles the data supplied by a drag and drop operation that ended with the given action.
The specified row, column and parent indicate the location of an item in the model where the operation ended.
When row and column are -1 it means that the dropped data should be considered as dropped directly on parent. Usually this will mean appending the data as child items of parent. If row and column are greater than or equal zero, it means that the drop occurred just before the specified row and column in the specified parent.
data | The supplied data by a drag and drop operation. |
action | Action specifies what to do with the data supplied by a drag and drop operation. |
row | The row of dropped data. |
column | The column of dropped data. |
index | The index of dropped data. |
return | Returns True if the data and action can be handled by the model; otherwise returns False. |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.editRows | ( | self, | |
row, | |||
count, | |||
parent = QModelIndex() |
|||
) |
Insert row into the model after the given position in drag and drop operation.
row | The row which is about to be insterted. |
positon | The position where it will be placed. |
count | The quantity of inserting rows. By default is 1 if a single file is placed into the list. |
index | The index of inserting rows. By default creates new empty index from QModelIndex class. |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.flags | ( | self, | |
index | |||
) |
Returns flags for the given index.
index | Index of item in the model. |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.getFiles | ( | self | ) |
Returns item into model.
def agroeyepy.Control.loadedfiles_model.LoadedFiles.insertRows | ( | self, | |
file, | |||
position, | |||
count = 1 , |
|||
index = QModelIndex() |
|||
) |
Insert count file into the model before the given position.
file | The file which is about to be insterted. |
positon | The position where it will be placed. |
count | The quantity of inserting rows. By default is 1 if a single file is placed into the list. |
index | The index of inserting rows. By default creates new empty index from QModelIndex class. |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.isVector | ( | self, | |
index = QModelIndex |
|||
) |
Returns True if selected file is vector; otherwise returns False.
def agroeyepy.Control.loadedfiles_model.LoadedFiles.mimeData | ( | self, | |
indexes | |||
) |
Returns an object that contains serialized items of data corresponding to the list of indexes specified.
The formats used to describe the encoded data is obtained from the mimeTypes() function.
indexes | The list of indexes of data. |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.mimeTypes | ( | self | ) |
Returns a list of MIME types that can be used to describe a list of model indexes.
def agroeyepy.Control.loadedfiles_model.LoadedFiles.removeRows | ( | self, | |
row, | |||
count = 1 , |
|||
parent = QModelIndex() |
|||
) |
Removes count rows starting with the given row under parent parent from the model.
row | The rows which is about to be removed. |
count | The quantity of removing row. |
parent | The index of removing rows. |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.rowCount | ( | self, | |
parent = QModelIndex() |
|||
) |
Returns the number of rows under the given parent.
parent | Index of data. |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.setData | ( | self, | |
index, | |||
value, | |||
role = Qt.EditRole |
|||
) |
Sets the role data for the item at index to value.
index | Index of setting data. |
value | The value to set. |
role | Role for item which is used by the view to indicate to the model which type of data it needs. By default the data in a form suitable for editing in an editor (QString). |
def agroeyepy.Control.loadedfiles_model.LoadedFiles.supportedDropActions | ( | self | ) |
Sets the supported drag actions for the items in the model.
agroeyepy.Control.loadedfiles_model.LoadedFiles.files |
|
static |
agroeyepy.Control.loadedfiles_model.LoadedFiles.parent |