mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2025-01-10 08:55:36 +00:00
Merge pull request #14 from virinext/clean_graph_window
Add a menu entry clear
This commit is contained in:
commit
b88c0fc67a
4 changed files with 20 additions and 1 deletions
|
@ -106,7 +106,8 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags):
|
|||
QAction *pactFlush = ptb -> addAction(QIcon(pxFulsh), "Flush");
|
||||
connect(pactFlush, SIGNAL(triggered()), SLOT(Flush()));
|
||||
|
||||
|
||||
QAction *pactClear = ptb -> addAction("Clear");
|
||||
connect(pactClear, SIGNAL(triggered()), SLOT(ClearGraph()));
|
||||
ptb -> addSeparator();
|
||||
|
||||
m_pslider = new SeekSlider();
|
||||
|
@ -142,6 +143,8 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags):
|
|||
pmenu -> addAction(pactPause);
|
||||
pmenu -> addAction(pactStop);
|
||||
pmenu -> addAction(pactFlush);
|
||||
pmenu -> addSeparator();
|
||||
pmenu -> addAction(pactClear);
|
||||
|
||||
|
||||
pmenu = menuBar() -> addMenu("&Help");
|
||||
|
@ -260,6 +263,13 @@ void MainWindow::Flush()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::ClearGraph()
|
||||
{
|
||||
qDebug() << "ClearGraph";
|
||||
PipelineIE::Clear(m_pGraph);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MainWindow::Seek(int val)
|
||||
{
|
||||
|
|
|
@ -40,6 +40,7 @@ class MainWindow: public QMainWindow
|
|||
void SaveAs();
|
||||
void Open();
|
||||
|
||||
void ClearGraph();
|
||||
void About();
|
||||
|
||||
private:
|
||||
|
|
|
@ -620,3 +620,10 @@ bool PipelineIE::Import(QSharedPointer<GraphManager> pgraph, const QString &file
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PipelineIE::Clear(QSharedPointer<GraphManager> pgraph)
|
||||
{
|
||||
GstElement *pipeline = pgraph -> m_pGraph;
|
||||
clearPipeline(pipeline);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace PipelineIE
|
|||
{
|
||||
bool Export(QSharedPointer<GraphManager> pgraph, const QString &fileName);
|
||||
bool Import(QSharedPointer<GraphManager> pgraph, const QString &fileName);
|
||||
bool Clear(QSharedPointer<GraphManager> pgraph);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue