int MoodBox::DrawingWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: clipartWindowRequest(); break; case 1: messageSent(); break; case 2: replyChanged(); break; case 3: clear(); break; case 4: reset(); break; case 5: addImage((*reinterpret_cast< const QImage(*)>(_a[1]))); break; case 6: addReply((*reinterpret_cast< const QImage(*)>(_a[1]))); break; case 7: on_penToolButton_clicked(); break; case 8: on_simplebrushToolButton_clicked(); break; case 9: on_oilbrushToolButton_clicked(); break; case 10: on_sprayToolButton_clicked(); break; case 11: on_eraserToolButton_clicked(); break; case 12: on_textToolButton_clicked(); break; case 13: on_picturesToolButton_clicked(); break; case 14: on_sendButton_clicked(); break; case 15: onItemAdded((*reinterpret_cast< QGraphicsItem*(*)>(_a[1]))); break; case 16: onItemRemoved((*reinterpret_cast< QGraphicsItem*(*)>(_a[1]))); break; case 17: onSceneCleared(); break; case 18: onSaveScene(); break; case 19: onSceneColorChanged(); break; case 20: onUndoChanged(); break; case 21: onContactListChanged(); break; case 22: onContactAuthorizationChanged((*reinterpret_cast< qint32(*)>(_a[1]))); break; case 23: onUserOnlineChanged(); break; default: ; } _id -= 24; } return _id; }
DirModel::DirModel(QObject *parent) : DirItemAbstractListModel(parent) , mFilterDirectories(false) , mShowDirectories(true) , mAwaitingResults(false) , mIsRecursive(false) , mReadsMediaMetadata(false) , mShowHiddenFiles(false) , mOnlyAllowedPaths(false) , mSortBy(SortByName) , mSortOrder(SortAscending) , mCompareFunction(0) , mExtFSWatcher(false) , mClipboard(new Clipboard(this)) , mLocationFactory(new LocationsFactory(this)) , mCurLocation(0) , m_fsAction(new FileSystemAction(this) ) { mNameFilters = QStringList() << "*"; mSelection = new DirSelection(this, &mDirectoryContents); connect(m_fsAction, SIGNAL(progress(int,int,int)), this, SIGNAL(progress(int,int,int))); connect(m_fsAction, SIGNAL(added(DirItemInfo)), this, SLOT(onItemAdded(DirItemInfo))); connect(m_fsAction, SIGNAL(added(QString)), this, SLOT(onItemAdded(QString))); connect(m_fsAction, SIGNAL(removed(DirItemInfo)), this, SLOT(onItemRemoved(DirItemInfo))); connect(m_fsAction, SIGNAL(removed(QString)), this, SLOT(onItemRemoved(QString))); connect(m_fsAction, SIGNAL(error(QString,QString)), this, SIGNAL(error(QString,QString))); connect(this, SIGNAL(pathChanged(QString)), m_fsAction, SLOT(pathChanged(QString))); connect(mClipboard, SIGNAL(clipboardChanged()), this, SIGNAL(clipboardChanged())); connect(m_fsAction, SIGNAL(changed(DirItemInfo)), this, SLOT(onItemChanged(DirItemInfo))); connect(mClipboard, SIGNAL(clipboardChanged()), m_fsAction, SLOT(onClipboardChanged())); connect(m_fsAction, SIGNAL(recopy(QStringList,QString)), mClipboard, SLOT(copy(QStringList,QString))); setCompareAndReorder(); if (QIcon::themeName().isEmpty() && !FMUtil::hasTriedThemeName()) { FMUtil::setThemeName(); } foreach (const Location* l, mLocationFactory->availableLocations()) { connect(l, SIGNAL(itemsAdded(DirItemInfoList)), this, SLOT(onItemsAdded(DirItemInfoList))); connect(l, SIGNAL(itemsFetched()), this, SLOT(onItemsFetched())); connect(l, SIGNAL(extWatcherItemAdded(DirItemInfo)), this, SLOT(onItemAddedOutsideFm(DirItemInfo))); connect(l, SIGNAL(extWatcherItemRemoved(DirItemInfo)), this, SLOT(onItemRemovedOutSideFm(DirItemInfo))); connect(l, SIGNAL(extWatcherItemChanged(DirItemInfo)), this, SLOT(onItemChangedOutSideFm(DirItemInfo))); connect(l, SIGNAL(extWatcherChangesFetched(int)), this, SLOT(onExternalFsWorkerFinished(int))); connect(l, SIGNAL(extWatcherPathChanged(QString)), this, SLOT(onThereAreExternalChanges(QString))); connect(this, SIGNAL(enabledExternalFSWatcherChanged(bool)), l, SLOT(setUsingExternalWatcher(bool))); } }
//-------------------------------------------------------------------------------------- // CProjectModel implementation //-------------------------------------------------------------------------------------- CProjectModel::CProjectModel() { m_pProject = NULL; m_pAttributeModel = new CAttributeModel(); m_pBinaryFileModel = new CBinaryFileModel(); m_pCartridgeModel = new CCartridgeModel(); m_pFilterModel = new CFilterModel(this); m_pGraphicsBankModel = new CGraphicsBankModel(); m_pSourceFileModel = new CSourceFileModel(); m_pTileStampModel = new CTileStampModel(); m_pMusicModel = new CMusicModel(); // Reroute signals from submodels. QObject::connect(m_pAttributeModel, SIGNAL(paletteAdded(QUuid)), this, SLOT(onItemAdded(QUuid))); QObject::connect(m_pAttributeModel, SIGNAL(paletteDeleted(QUuid)), this, SLOT(onItemRemoved(QUuid))); QObject::connect(m_pBinaryFileModel, SIGNAL(binaryFileAdded(QUuid)), this, SLOT(onItemAdded(QUuid))); QObject::connect(m_pBinaryFileModel, SIGNAL(binaryFileRemoved(QUuid)), this, SLOT(onItemRemoved(QUuid))); QObject::connect(m_pGraphicsBankModel, SIGNAL(graphicsBankAdded(QUuid)), this, SLOT(onItemAdded(QUuid))); QObject::connect(m_pGraphicsBankModel, SIGNAL(graphicsBankDeleted(QUuid)), this, SLOT(onItemRemoved(QUuid))); QObject::connect(m_pSourceFileModel, SIGNAL(sourceFileAdded(QUuid)), this, SLOT(onItemAdded(QUuid))); QObject::connect(m_pSourceFileModel, SIGNAL(sourceFileRemoved(QUuid)), this, SLOT(onItemRemoved(QUuid))); QObject::connect(m_pTileStampModel, SIGNAL(tileStampAdded(QUuid)), this, SLOT(onItemAdded(QUuid))); QObject::connect(m_pTileStampModel, SIGNAL(tileStampRemoved(QUuid)), this, SLOT(onItemRemoved(QUuid))); QObject::connect(m_pMusicModel, SIGNAL(musicFileAdded(QUuid)), this, SLOT(onItemAdded(QUuid))); QObject::connect(m_pMusicModel, SIGNAL(musicFileDeleted(QUuid)), this, SLOT(onItemRemoved(QUuid))); }
void ProjectItem::addItem( const ProjectItem& item ) { onItemAdded(item); }