9#include "AbstractImageItem.h"
17#include "ControlNet.h"
21 AbstractImageItem::AbstractImageItem(QString imageSerial, ControlNet *net,
22 int avgCharWidth, AbstractTreeItem *parent)
23 : AbstractTreeItem(parent) {
24 m_imageAndNet =
new QPair<QString, ControlNet *>(imageSerial, net);
25 calcDataWidth(avgCharWidth);
29 AbstractImageItem::~AbstractImageItem() {
37 QVariant AbstractImageItem::getData()
const {
39 return QVariant(m_imageAndNet->first);
45 QVariant AbstractImageItem::getData(QString columnTitle)
const {
50 void AbstractImageItem::setData(QString
const &columnTitle,
51 QString
const &newData) {
55 bool AbstractImageItem::isDataEditable(QString columnTitle)
const {
60 void AbstractImageItem::deleteSource() { }
63 AbstractTreeItem::InternalPointerType AbstractImageItem::getPointerType()
const {
64 return AbstractTreeItem::ImageAndNet;
68 void *AbstractImageItem::getPointer()
const {
73 bool AbstractImageItem::hasImage(QString imageSerial)
const {
77 return (QString::compare(m_imageAndNet->first, imageSerial) == 0) ||
78 AbstractTreeItem::hasImage(imageSerial);
86 void AbstractImageItem::sourceDeleted() { }
This is free and unencumbered software released into the public domain.