diff options
Diffstat (limited to 'client/macro.cc')
-rw-r--r-- | client/macro.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/client/macro.cc b/client/macro.cc index d4ae0c0..08e44f4 100644 --- a/client/macro.cc +++ b/client/macro.cc @@ -123,9 +123,23 @@ static void create_macro(QString course, QString macro) cleanup_macros(); + // + // TODO: This is where the dependency checking should occur. + // + // Initiate the new macro window with the xml document and push // it to the window list - macrowindows.push_back( new MacroWindow(&xml_doc) ); + QDomNodeList courses = xml_doc.documentElement().childNodes(); + QDomNode coursenode = courses.at(0); // There can be only one! + QDomNodeList macros = coursenode.childNodes(); + for(int j = 0; j < macros.count(); j++) { + QDomNode macronode = macros.at(j); + // Only create if the macro contains something. + if(macronode.childNodes().count()) + macrowindows.push_back( new MacroWindow( macronode ) ); + } + //} + } } bool MacroEventFilter::eventFilter( QObject *, QEvent *e ) |