Agroeye  1.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
agroeyepy.Control.loadedfiles_model.LoadedFiles Class Reference
Inheritance diagram for agroeyepy.Control.loadedfiles_model.LoadedFiles:
Collaboration diagram for agroeyepy.Control.loadedfiles_model.LoadedFiles:

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'
 

Constructor & Destructor Documentation

§ __init__()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.__init__ (   self,
  parent = None 
)

Member Function Documentation

§ data()

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.

Parameters
indexIndex of item in the model.
roleRole 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).
Here is the caller graph for this function:

§ dropMimeData()

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.

Parameters
dataThe supplied data by a drag and drop operation.
actionAction specifies what to do with the data supplied by a drag and drop operation.
rowThe row of dropped data.
columnThe column of dropped data.
indexThe index of dropped data.
returnReturns True if the data and action can be handled by the model; otherwise returns False.
Here is the call graph for this function:

§ editRows()

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.

Parameters
rowThe row which is about to be insterted.
positonThe position where it will be placed.
countThe quantity of inserting rows. By default is 1 if a single file is placed into the list.
indexThe index of inserting rows. By default creates new empty index from QModelIndex class.
Returns
Returns True if the rows were successfully inserted; otherwise returns False.
Here is the caller graph for this function:

§ flags()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.flags (   self,
  index 
)

Returns flags for the given index.

Parameters
indexIndex of item in the model.

§ getFiles()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.getFiles (   self)

Returns item into model.

§ insertRows()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.insertRows (   self,
  file,
  position,
  count = 1,
  index = QModelIndex() 
)

Insert count file into the model before the given position.

Parameters
fileThe file which is about to be insterted.
positonThe position where it will be placed.
countThe quantity of inserting rows. By default is 1 if a single file is placed into the list.
indexThe index of inserting rows. By default creates new empty index from QModelIndex class.
Returns
Returns True if the rows were successfully inserted; otherwise returns False.

§ isVector()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.isVector (   self,
  index = QModelIndex 
)

Returns True if selected file is vector; otherwise returns False.

§ mimeData()

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.

Parameters
indexesThe list of indexes of data.
Here is the call graph for this function:

§ mimeTypes()

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.

§ removeRows()

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.

Parameters
rowThe rows which is about to be removed.
countThe quantity of removing row.
parentThe index of removing rows.
Returns
Returns True if the rows were successfully removed; otherwise returns False.
Here is the call graph for this function:

§ rowCount()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.rowCount (   self,
  parent = QModelIndex() 
)

Returns the number of rows under the given parent.

Parameters
parentIndex of data.
Here is the caller graph for this function:

§ setData()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.setData (   self,
  index,
  value,
  role = Qt.EditRole 
)

Sets the role data for the item at index to value.

Parameters
indexIndex of setting data.
valueThe value to set.
roleRole 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).
Returns
Returns True if successful; otherwise returns False.
Here is the caller graph for this function:

§ supportedDropActions()

def agroeyepy.Control.loadedfiles_model.LoadedFiles.supportedDropActions (   self)

Sets the supported drag actions for the items in the model.

Member Data Documentation

§ files

agroeyepy.Control.loadedfiles_model.LoadedFiles.files

§ Mimetype

string agroeyepy.Control.loadedfiles_model.LoadedFiles.Mimetype = 'application/x-qabstractmodeldatalist'
static

§ parent

agroeyepy.Control.loadedfiles_model.LoadedFiles.parent

The documentation for this class was generated from the following file: