Beispiel #1
0
void SchematicScenePanel::hideEvent(QHideEvent *e) {
  TApp *app = TApp::instance();
  disconnect(m_schematicViewer, SIGNAL(showPreview(TFxP)), this,
             SLOT(onShowPreview(TFxP)));
  disconnect(m_schematicViewer, SIGNAL(doCollapse(const QList<TFxP> &)), this,
             SLOT(onCollapse(const QList<TFxP> &)));
  disconnect(m_schematicViewer, SIGNAL(doCollapse(QList<TStageObjectId>)), this,
             SLOT(onCollapse(QList<TStageObjectId>)));
  disconnect(m_schematicViewer, SIGNAL(doExplodeChild(const QList<TFxP> &)),
             this, SLOT(onExplodeChild(const QList<TFxP> &)));
  disconnect(m_schematicViewer, SIGNAL(doExplodeChild(QList<TStageObjectId>)),
             this, SLOT(onExplodeChild(QList<TStageObjectId>)));
  disconnect(m_schematicViewer, SIGNAL(editObject()), this,
             SLOT(onEditObject()));
  disconnect(app->getCurrentLevel(), SIGNAL(xshLevelChanged()),
             m_schematicViewer, SLOT(updateScenes()));
  disconnect(app->getCurrentObject(), SIGNAL(objectSwitched()),
             m_schematicViewer, SLOT(updateScenes()));
  disconnect(app->getCurrentXsheet(), SIGNAL(xsheetSwitched()),
             m_schematicViewer, SLOT(updateSchematic()));
  disconnect(app->getCurrentXsheet(), SIGNAL(xsheetChanged()),
             m_schematicViewer, SLOT(updateSchematic()));
  disconnect(app->getCurrentScene(), SIGNAL(sceneSwitched()), m_schematicViewer,
             SLOT(onSceneSwitched()));
}
Beispiel #2
0
void SchematicScenePanel::showEvent(QShowEvent *e) {
  if (m_schematicViewer->isStageSchematicViewed())
    setWindowTitle("Stage Schematic");
  else
    setWindowTitle("Fx Schematic");

  TApp *app = TApp::instance();
  connect(m_schematicViewer, SIGNAL(showPreview(TFxP)), this,
          SLOT(onShowPreview(TFxP)));
  connect(m_schematicViewer, SIGNAL(doCollapse(const QList<TFxP> &)), this,
          SLOT(onCollapse(const QList<TFxP> &)));
  connect(m_schematicViewer, SIGNAL(doCollapse(QList<TStageObjectId>)), this,
          SLOT(onCollapse(QList<TStageObjectId>)));
  connect(m_schematicViewer, SIGNAL(doExplodeChild(const QList<TFxP> &)), this,
          SLOT(onExplodeChild(const QList<TFxP> &)));
  connect(m_schematicViewer, SIGNAL(doExplodeChild(QList<TStageObjectId>)),
          this, SLOT(onExplodeChild(QList<TStageObjectId>)));
  connect(m_schematicViewer, SIGNAL(editObject()), this, SLOT(onEditObject()));
  connect(app->getCurrentLevel(), SIGNAL(xshLevelChanged()), m_schematicViewer,
          SLOT(updateScenes()));
  connect(app->getCurrentObject(), SIGNAL(objectSwitched()), m_schematicViewer,
          SLOT(updateScenes()));
  connect(app->getCurrentXsheet(), SIGNAL(xsheetSwitched()), m_schematicViewer,
          SLOT(updateSchematic()));
  connect(app->getCurrentXsheet(), SIGNAL(xsheetChanged()), m_schematicViewer,
          SLOT(updateSchematic()));
  connect(app->getCurrentScene(), SIGNAL(sceneSwitched()), m_schematicViewer,
          SLOT(onSceneSwitched()));
  m_schematicViewer->updateSchematic();
}
Beispiel #3
0
CheckDirTree::CheckDirTree( QWidget* parent )
    : QTreeView( parent )
{
    m_dirModel.setFilter( QDir::Dirs | QDir::NoDotAndDotDot );
    m_dirModel.setRootPath( "/" );

    m_dirModel.setNameFilters( QStringList() << "[^\\.]*" );

    setModel( &m_dirModel );
    setColumnHidden( 1, true );
    setColumnHidden( 2, true );
    setColumnHidden( 3, true );
    //header()->hide();

    connect( &m_dirModel, SIGNAL( dataChangedByUser( QModelIndex ) ),
                            SLOT( updateNode( QModelIndex ) ) );
    connect( &m_dirModel, SIGNAL( dataChangedByUser( const QModelIndex& ) ),
                          SIGNAL( changed() ) );
    connect( &m_dirModel, SIGNAL( modelReset() ),
                            SLOT( modelReset() ) );

    connect( this, SIGNAL( collapsed( QModelIndex ) ),
                     SLOT( onCollapse( QModelIndex ) ) );
    connect( this, SIGNAL( expanded( QModelIndex ) ),
                     SLOT( onExpand( QModelIndex ) ) );
}
Beispiel #4
0
void BookmarksPanel::setup()
{
    UrlPanel::setup();

    connect(panelTreeView(), SIGNAL(delKeyPressed()), this, SLOT(deleteBookmark()));
    connect(panelTreeView(), SIGNAL(collapsed(QModelIndex)), this, SLOT(onCollapse(QModelIndex)));
    connect(panelTreeView(), SIGNAL(expanded(QModelIndex)), this, SLOT(onExpand(QModelIndex)));

    loadFoldedState();
}
StageSchematicScene::StageSchematicScene(QWidget *parent)
	: SchematicScene(parent), m_nextNodePos(0, 0), m_xshHandle(0), m_objHandle(0), m_colHandle(0), m_sceneHandle(0), m_frameHandle(0), m_gridDimension(eSmall), m_showLetterOnPortFlag(ShowLetterOnOutputPortOfStageNode!=0)
{
	QPointF sceneCenter = sceneRect().center();
	m_firstPos = TPointD(sceneCenter.x(), sceneCenter.y());

	m_selection = new StageObjectSelection();
	connect(m_selection, SIGNAL(doCollapse(QList<TStageObjectId>)), this, SLOT(onCollapse(QList<TStageObjectId>)));
	connect(m_selection, SIGNAL(doExplodeChild(QList<TStageObjectId>)), this, SIGNAL(doExplodeChild(QList<TStageObjectId>)));
	connect(this, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
	m_highlightedLinks.clear();
}
	void TreeItem::setExpanded(bool ex) {
		expanded = ex;
		if (ex) {
			if (onExpand) {
				onExpand(this);
			}
		}
		else {
			if (onCollapse) {
				onCollapse(this);
			}
		}
	}