libyui-qt-graph  2.43.0
 All Classes Functions
YQGraphPluginImpl.cc
1 /*
2  * Copyright (c) [2009-2012] Novell, Inc.
3  *
4  * All Rights Reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as published
8  * by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, contact Novell, Inc.
17  *
18  * To contact Novell about this file by physical or electronic mail, you may
19  * find current contact information at www.novell.com.
20  */
21 
22 /*
23  * File: YQGraphPluginImpl.cc
24  * Author: Arvin Schnell <aschnell@suse.de>
25  */
26 
27 
28 #include "YQGraphPluginImpl.h"
29 #include "YQGraph.h"
30 
31 #define YUILogComponent "qt-graph"
32 #include <YUILog.h>
33 
34 ///////////////////////////////////////////////////////////////////
35 //
36 //
37 // METHOD NAME : YQGraphPluginStub::createGraph
38 // METHOD TYPE : YWidget
39 //
40 // DESCRIPTION : Create YQGraphStart which reads the layout
41 // term of the package selection dialog, creates the widget
42 // tree and creates the YQGraph.
43 //
44 extern "C"
45 {
47 }
48 
49 YGraph * YQGraphPluginImpl::createGraph( YWidget * parent, const std::string & filename,
50  const std::string & layoutAlgorithm )
51 {
52  /* if ( error() )
53  return 0; */
54 
55  YQGraph * yqgraph = new YQGraph( parent, filename, layoutAlgorithm );
56 
57  YUI_CHECK_NEW( yqgraph );
58 
59  return yqgraph;
60 }
61 
62 
63 YGraph * YQGraphPluginImpl::createGraph( YWidget * parent, /* graph_t */ void * graph )
64 {
65  /* if ( error() )
66  return 0; */
67 
68  YQGraph * yqgraph = new YQGraph( parent, graph );
69 
70  YUI_CHECK_NEW( yqgraph );
71 
72  return yqgraph;
73 }