예제 #1
0
RevsView::RevsView(MainImpl* mi, Git* g, bool isMain) : Domain(mi, g, isMain) {
    revTab = new Ui_TabRev();
    revTab->setupUi(container);

    tab()->listViewLog->setup(this, g);
    tab()->textBrowserDesc->setup(this);
    tab()->textEditDiff->setup(this, git);
    tab()->fileList->setup(this, git);
    m()->treeView->setup(this, git);

//    setTabLogDiffVisible(QGit::testFlag(QGit::LOG_DIFF_TAB_F));

    // restore geometry
    QVector<QSplitter*> v;
    v << tab()->horizontalSplitter << tab()->verticalSplitter;
    QGit::restoreGeometrySetting(QGit::REV_GEOM_KEY, NULL, &v);

    connect(m(), SIGNAL(typeWriterFontChanged()),
            tab()->textEditDiff, SLOT(typeWriterFontChanged()));

    connect(git, SIGNAL(newRevsAdded(const FileHistory*, const QVector<ShaString>&)),
            this, SLOT(on_newRevsAdded(const FileHistory*, const QVector<ShaString>&)));

    connect(git, SIGNAL(loadCompleted(const FileHistory*, const QString&)),
            this, SLOT(on_loadCompleted(const FileHistory*, const QString&)));

    connect(m(), SIGNAL(changeFont(const QFont&)),
            tab()->listViewLog, SLOT(on_changeFont(const QFont&)));

    connect(m(), SIGNAL(updateRevDesc()), this, SLOT(on_updateRevDesc()));

    connect(tab()->listViewLog, SIGNAL(lanesContextMenuRequested(const QStringList&,
            const QStringList&)), this, SLOT(on_lanesContextMenuRequested
           (const QStringList&, const QStringList&)));

    connect(tab()->listViewLog, SIGNAL(revisionsDragged(const QStringList&)),
            m(), SLOT(revisionsDragged(const QStringList&)));

    connect(tab()->listViewLog, SIGNAL(revisionsDropped(const QStringList&)),
            m(), SLOT(revisionsDropped(const QStringList&)));

    connect(tab()->listViewLog, SIGNAL(contextMenu(const QString&, int)),
            this, SLOT(on_contextMenu(const QString&, int)));

    connect(m()->treeView, SIGNAL(contextMenu(const QString&, int)),
            this, SLOT(on_contextMenu(const QString&, int)));

    connect(tab()->fileList, SIGNAL(contextMenu(const QString&, int)),
            this, SLOT(on_contextMenu(const QString&, int)));

    connect(m(), SIGNAL(changeFont(const QFont&)),
           tab()->fileList, SLOT(on_changeFont(const QFont&)));

    connect(m(), SIGNAL(highlightPatch(const QString&, bool)),
            tab()->textEditDiff, SLOT(on_highlightPatch(const QString&, bool)));
}
예제 #2
0
RevsView::RevsView(MainImpl* mi, Git* g, bool isMain) : Domain(mi, g, isMain) {

	revTab = new Ui_TabRev();
	revTab->setupUi(container);

	tab()->listViewLog->setup(this, g);
	tab()->textBrowserDesc->setup(this);

	// restore geometry
	QVector<QSplitter*> v;
	v << tab()->horizontalSplitter << tab()->verticalSplitter;
	QGit::restoreGeometrySetting(QGit::REV_GEOM_KEY, NULL, &v);

	connect(git, SIGNAL(newRevsAdded(const FileHistory*, const QVector<ShaString>&)),
	        this, SLOT(on_newRevsAdded(const FileHistory*, const QVector<ShaString>&)));

	connect(git, SIGNAL(loadCompleted(const FileHistory*, const QString&)),
	        this, SLOT(on_loadCompleted(const FileHistory*, const QString&)));

	connect(m(), SIGNAL(changeFont(const QFont&)),
	        tab()->listViewLog, SLOT(on_changeFont(const QFont&)));

	connect(m(), SIGNAL(updateRevDesc()), this, SLOT(on_updateRevDesc()));

	connect(tab()->listViewLog, SIGNAL(lanesContextMenuRequested(const QStringList&,
	        const QStringList&)), this, SLOT(on_lanesContextMenuRequested
	       (const QStringList&, const QStringList&)));

	connect(tab()->listViewLog, SIGNAL(revisionsDragged(const QStringList&)),
	        m(), SLOT(revisionsDragged(const QStringList&)));

	connect(tab()->listViewLog, SIGNAL(revisionsDropped(const QStringList&)),
	        m(), SLOT(revisionsDropped(const QStringList&)));

	connect(tab()->listViewLog, SIGNAL(contextMenu(const QString&, int)),
	        this, SLOT(on_contextMenu(const QString&, int)));

    //FIXME: remove me
    /*connect(m()->treeView, SIGNAL(contextMenu(const QString&, int)),
            this, SLOT(on_contextMenu(const QString&, int)));*/
}