# HG changeset patch # User John Kern # Date 1251943466 25200 # Node ID 8e9c5760ce6fa5bcab5805ade735528374b9a33b # Parent bbe0af256f1b3b451ea18305c44648aba3c4af4a working on a status view diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/AtAGlance.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BuildLogViewer/AtAGlance.cpp Wed Sep 02 19:04:26 2009 -0700 @@ -0,0 +1,105 @@ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +using namespace std; + +#include "AtAGlance.h" + +AtAGlance::AtAGlance(QString filename, QWidget *parent) +{ + setAttribute(Qt::WA_DeleteOnClose); + + QFile file(filename); + QFileInfo fi(file); + this->setWindowTitle("Status " + fi.baseName()); + + m_buildStatus = new BuildStatus(); + m_buildStatus->setTime(fi.lastModified()); + + if (!file.open(QIODevice::ReadOnly)) { + QMessageBox::warning(this, tr("Build Log Viewer"), tr("Cannot open log.")); + return ; + } + m_log = new QDomDocument("Build Log"); + if (!m_log->setContent(&file)) { + QMessageBox::warning(this, tr("Build Log Viewer"), tr("Cannot set content.")); + file.close(); + return ; + } + file.close(); +} + +AtAGlance::~AtAGlance() +{ + delete m_log; + delete m_buildStatus; +} + +// Walk Dom tree. +void AtAGlance::traveAndPopulate() +{ + this->traveAndPopulate(m_log->documentElement()); +} +void AtAGlance::traveAndPopulate(QDomElement e) +{ + QString name = e.tagName(); + + if (e.isNull()) + { + return; + } + + // if this is an info tags, look for + // System Definition file sf/app/organizer/package_definition.xml + if (name.compare("info",Qt::CaseInsensitive)== 0 ) + { + // example + // System Definition file sf/app/organizer/package_definition.xml + QRegExp re("^System Definition file .*package_definition.*$"); + re.setPatternSyntax(QRegExp::Wildcard); + + string blah = e.text().toStdString(); + + if (re.exactMatch( e.text() ) ) + { + std::cout << "info: " << e.text().toStdString()<< std::endl; + } + } + + // if this is a status tag and the exit attribute is failed, the build failed. + if (name.compare("status",Qt::CaseInsensitive)== 0 ) + { + m_buildStatus->setStatus(false); + } + + QString text_debug; + QDomElement e1 = e.firstChild().toElement(); + while(!e1.isNull()) + { + this->traveAndPopulate(e1); + e1 = e1.nextSibling().toElement(); + name = e1.tagName(); + text_debug = e1.text(); + } +} + +void AtAGlance::decideOnLayout() +{ + QGridLayout *layout = new QGridLayout(this); + + layout->addWidget(new QLabel("What: "), 1, 1); + layout->addWidget(new QLabel("When: "), 2, 1); + layout->addWidget(new QLabel("Status: "), 3, 1); +} diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/AtAGlance.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BuildLogViewer/AtAGlance.h Wed Sep 02 19:04:26 2009 -0700 @@ -0,0 +1,32 @@ +#ifndef ATAGLANCE_H +#define ATAGLANCE_H + +#include +#include + +#include "BuildStatus.h" + +/* + * This class presents the status for a given build. It gets the + * appropriate data from the model. + */ + +class AtAGlance : public QWidget +{ + Q_OBJECT + +public: + AtAGlance(QString filename, QWidget *parent = 0 ); + ~AtAGlance(); + + void traveAndPopulate(); + void decideOnLayout(); +private: + void traveAndPopulate(QDomElement e); + +private: + QDomDocument *m_log; + BuildStatus *m_buildStatus; +}; + +#endif // ATAGLANCE_H diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/BuildLogViewer.pro --- a/BuildLogViewer/BuildLogViewer.pro Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/BuildLogViewer.pro Wed Sep 02 19:04:26 2009 -0700 @@ -8,9 +8,13 @@ mainwindow.cpp \ Document.cpp \ DomModel.cpp \ - DomItem.cpp + DomItem.cpp \ + AtAGlance.cpp \ + BuildStatus.cpp HEADERS += mainwindow.h \ Document.h \ DomItem.h \ - DomModel.h + DomModel.h \ + AtAGlance.h \ + BuildStatus.h FORMS += mainwindow.ui diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/BuildLogViewer.pro.user --- a/BuildLogViewer/BuildLogViewer.pro.user Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/BuildLogViewer.pro.user Wed Sep 02 19:04:26 2009 -0700 @@ -46,7 +46,7 @@ Debug 0 - C:\workspace\tinker\BuildLogViewer + C:\workspace\QtExamples\BuildLogViewer @@ -101,14 +101,14 @@ WINDIR=C:\WINDOWS - C:/workspace/tinker/BuildLogViewer/BuildLogViewer.pro + C:/workspace/QtExamples/BuildLogViewer/BuildLogViewer.pro -spec win32-g++ -r C:/Qt/2009.03/qt/bin/qmake.exe false - C:/workspace/tinker/BuildLogViewer + C:/workspace/QtExamples/BuildLogViewer 2 @@ -160,7 +160,7 @@ C:/Qt/2009.03/mingw/bin/mingw32-make.exe true - C:/workspace/tinker/BuildLogViewer + C:/workspace/QtExamples/BuildLogViewer diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/BuildStatus.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BuildLogViewer/BuildStatus.cpp Wed Sep 02 19:04:26 2009 -0700 @@ -0,0 +1,32 @@ +#include "BuildStatus.h" + +BuildStatus::BuildStatus(QObject *parent) +{ + setParent(parent); +} + +void BuildStatus::setTime(QDateTime w) +{ + this->m_when = w; + this->m_status = true; +} + +QString BuildStatus::Time() +{ + return this->m_when.toString(); +} + +void BuildStatus::setName(QString n) +{ + if (m_packageName) + { + delete m_packageName; + m_packageName = NULL; + } + m_packageName = new QString(n); +} + +QString BuildStatus::name() +{ + return *m_packageName; +} diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/BuildStatus.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BuildLogViewer/BuildStatus.h Wed Sep 02 19:04:26 2009 -0700 @@ -0,0 +1,31 @@ +#ifndef BUILDSTATUS_H +#define BUILDSTATUS_H + +#include +#include + +class BuildStatus : public QObject +{ +public: + BuildStatus(QObject *parent = 0); + + void setName(QString n); + QString name(); + + void setTime(QDateTime w); + QString Time(); + + void setStatus (bool n ) { m_status = n ; } ; + + + + // What was the name of the package? + QString *m_packageName; + // At this time, the symbain build log doesn't have a timestamp in it. + // So, we will use the timestamp on the file. + QDateTime m_when; + // Did the build succeed? + bool m_status; +}; + +#endif // BUILDSTATUS_H diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/Document.cpp --- a/BuildLogViewer/Document.cpp Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/Document.cpp Wed Sep 02 19:04:26 2009 -0700 @@ -24,6 +24,6 @@ return ; } file.close(); - model = new DomModel(*log, this); + model = new DomModel(log, this); this->setModel(model); } diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/DomModel.cpp --- a/BuildLogViewer/DomModel.cpp Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/DomModel.cpp Wed Sep 02 19:04:26 2009 -0700 @@ -45,15 +45,16 @@ #include "domitem.h" #include "dommodel.h" - DomModel::DomModel(QDomDocument document, QObject *parent) + DomModel::DomModel(QDomDocument *document, QObject *parent) : QAbstractItemModel(parent), domDocument(document) { - rootItem = new DomItem(domDocument, 0); + rootItem = new DomItem(*domDocument, 0); } DomModel::~DomModel() { delete rootItem; + delete this->domDocument; } int DomModel::columnCount(const QModelIndex &/*parent*/) const diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/DomModel.h --- a/BuildLogViewer/DomModel.h Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/DomModel.h Wed Sep 02 19:04:26 2009 -0700 @@ -47,6 +47,11 @@ #include #include +/* + * This class encapsulates the DOM tree for the build output log and provides + * an interface to the classes which presents it to the user. + */ + class DomItem; class DomModel : public QAbstractItemModel @@ -54,7 +59,7 @@ Q_OBJECT public: - DomModel(QDomDocument document, QObject *parent = 0); + DomModel(QDomDocument *document, QObject *parent = 0); ~DomModel(); QVariant data(const QModelIndex &index, int role) const; @@ -68,7 +73,7 @@ int columnCount(const QModelIndex &parent = QModelIndex()) const; private: - QDomDocument domDocument; + QDomDocument *domDocument; DomItem *rootItem; }; diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/Makefile --- a/BuildLogViewer/Makefile Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/Makefile Wed Sep 02 19:04:26 2009 -0700 @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: BuildLogViewer -# Generated by qmake (2.01a) (Qt 4.5.2) on: Fri Aug 28 11:18:04 2009 +# Generated by qmake (2.01a) (Qt 4.5.2) on: Wed Sep 2 11:10:47 2009 # Project: BuildLogViewer.pro # Template: app # Command: c:\Qt\2009.03\qt\bin\qmake.exe -spec ..\..\..\Qt\2009.03\qt\mkspecs\win32-g++ -win32 -o Makefile BuildLogViewer.pro diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/Makefile.Debug --- a/BuildLogViewer/Makefile.Debug Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/Makefile.Debug Wed Sep 02 19:04:26 2009 -0700 @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: BuildLogViewer -# Generated by qmake (2.01a) (Qt 4.5.2) on: Fri Aug 28 11:18:04 2009 +# Generated by qmake (2.01a) (Qt 4.5.2) on: Wed Sep 2 11:10:46 2009 # Project: BuildLogViewer.pro # Template: app ############################################################################# @@ -44,17 +44,23 @@ mainwindow.cpp \ Document.cpp \ DomModel.cpp \ - DomItem.cpp debug\moc_mainwindow.cpp \ + DomItem.cpp \ + AtAGlance.cpp \ + BuildStatus.cpp debug\moc_mainwindow.cpp \ debug\moc_Document.cpp \ - debug\moc_DomModel.cpp + debug\moc_DomModel.cpp \ + debug\moc_AtAGlance.cpp OBJECTS = debug/main.o \ debug/mainwindow.o \ debug/Document.o \ debug/DomModel.o \ debug/DomItem.o \ + debug/AtAGlance.o \ + debug/BuildStatus.o \ debug/moc_mainwindow.o \ debug/moc_Document.o \ - debug/moc_DomModel.o + debug/moc_DomModel.o \ + debug/moc_AtAGlance.o DIST = QMAKE_TARGET = BuildLogViewer DESTDIR = debug\ #avoid trailing-slash linebreak @@ -83,7 +89,7 @@ all: Makefile.Debug $(DESTDIR_TARGET) $(DESTDIR_TARGET): ui_mainwindow.h $(OBJECTS) - $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) $(OBJECTS) $(LIBS) + $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) object_script.BuildLogViewer.Debug $(LIBS) qmake: FORCE @@ -93,7 +99,7 @@ $(ZIP) BuildLogViewer.zip $(SOURCES) $(DIST) BuildLogViewer.pro ..\..\..\Qt\2009.03\qt\mkspecs\qconfig.pri ..\..\..\Qt\2009.03\qt\mkspecs\features\qt_functions.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\qt_config.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\exclusive_builds.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\default_pre.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\default_pre.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\debug.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\debug_and_release.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\default_post.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\default_post.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\build_pass.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\rtti.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\exceptions.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\stl.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\shared.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\warn_on.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\qt.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\thread.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\moc.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\windows.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\resources.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\uic.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\yacc.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\lex.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\include_source_dir.prf c:\Qt\2009.03\qt\lib\qtmaind.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES clean: compiler_clean - -$(DEL_FILE) debug\main.o debug\mainwindow.o debug\Document.o debug\DomModel.o debug\DomItem.o debug\moc_mainwindow.o debug\moc_Document.o debug\moc_DomModel.o + -$(DEL_FILE) debug\main.o debug\mainwindow.o debug\Document.o debug\DomModel.o debug\DomItem.o debug\AtAGlance.o debug\BuildStatus.o debug\moc_mainwindow.o debug\moc_Document.o debug\moc_DomModel.o debug\moc_AtAGlance.o distclean: clean -$(DEL_FILE) $(DESTDIR_TARGET) @@ -103,9 +109,9 @@ mocables: compiler_moc_header_make_all compiler_moc_source_make_all -compiler_moc_header_make_all: debug/moc_mainwindow.cpp debug/moc_Document.cpp debug/moc_DomModel.cpp +compiler_moc_header_make_all: debug/moc_mainwindow.cpp debug/moc_Document.cpp debug/moc_DomModel.cpp debug/moc_AtAGlance.cpp compiler_moc_header_clean: - -$(DEL_FILE) debug\moc_mainwindow.cpp debug\moc_Document.cpp debug\moc_DomModel.cpp + -$(DEL_FILE) debug\moc_mainwindow.cpp debug\moc_Document.cpp debug\moc_DomModel.cpp debug\moc_AtAGlance.cpp debug/moc_mainwindow.cpp: Document.h \ DomModel.h \ mainwindow.h @@ -118,6 +124,10 @@ debug/moc_DomModel.cpp: DomModel.h C:/Qt/2009.03/qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 DomModel.h -o debug\moc_DomModel.cpp +debug/moc_AtAGlance.cpp: BuildStatus.h \ + AtAGlance.h + C:/Qt/2009.03/qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 AtAGlance.h -o debug\moc_AtAGlance.cpp + compiler_rcc_make_all: compiler_rcc_clean: compiler_image_collection_make_all: qmake_image_collection.cpp @@ -148,7 +158,9 @@ DomModel.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\main.o main.cpp -debug/mainwindow.o: mainwindow.cpp Document.h \ +debug/mainwindow.o: mainwindow.cpp AtAGlance.h \ + BuildStatus.h \ + Document.h \ DomModel.h \ mainwindow.h \ ui_mainwindow.h @@ -165,6 +177,13 @@ debug/DomItem.o: DomItem.cpp domitem.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\DomItem.o DomItem.cpp +debug/AtAGlance.o: AtAGlance.cpp AtAGlance.h \ + BuildStatus.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\AtAGlance.o AtAGlance.cpp + +debug/BuildStatus.o: BuildStatus.cpp BuildStatus.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\BuildStatus.o BuildStatus.cpp + debug/moc_mainwindow.o: debug/moc_mainwindow.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_mainwindow.o debug\moc_mainwindow.cpp @@ -174,6 +193,9 @@ debug/moc_DomModel.o: debug/moc_DomModel.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_DomModel.o debug\moc_DomModel.cpp +debug/moc_AtAGlance.o: debug/moc_AtAGlance.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_AtAGlance.o debug\moc_AtAGlance.cpp + ####### Install install: FORCE diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/Makefile.Release --- a/BuildLogViewer/Makefile.Release Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/Makefile.Release Wed Sep 02 19:04:26 2009 -0700 @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: BuildLogViewer -# Generated by qmake (2.01a) (Qt 4.5.2) on: Fri Aug 28 11:18:04 2009 +# Generated by qmake (2.01a) (Qt 4.5.2) on: Wed Sep 2 11:10:47 2009 # Project: BuildLogViewer.pro # Template: app ############################################################################# @@ -44,17 +44,23 @@ mainwindow.cpp \ Document.cpp \ DomModel.cpp \ - DomItem.cpp release\moc_mainwindow.cpp \ + DomItem.cpp \ + AtAGlance.cpp \ + BuildStatus.cpp release\moc_mainwindow.cpp \ release\moc_Document.cpp \ - release\moc_DomModel.cpp + release\moc_DomModel.cpp \ + release\moc_AtAGlance.cpp OBJECTS = release/main.o \ release/mainwindow.o \ release/Document.o \ release/DomModel.o \ release/DomItem.o \ + release/AtAGlance.o \ + release/BuildStatus.o \ release/moc_mainwindow.o \ release/moc_Document.o \ - release/moc_DomModel.o + release/moc_DomModel.o \ + release/moc_AtAGlance.o DIST = QMAKE_TARGET = BuildLogViewer DESTDIR = release\ #avoid trailing-slash linebreak @@ -83,7 +89,7 @@ all: Makefile.Release $(DESTDIR_TARGET) $(DESTDIR_TARGET): ui_mainwindow.h $(OBJECTS) - $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) $(OBJECTS) $(LIBS) + $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) object_script.BuildLogViewer.Release $(LIBS) qmake: FORCE @@ -93,7 +99,7 @@ $(ZIP) BuildLogViewer.zip $(SOURCES) $(DIST) BuildLogViewer.pro ..\..\..\Qt\2009.03\qt\mkspecs\qconfig.pri ..\..\..\Qt\2009.03\qt\mkspecs\features\qt_functions.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\qt_config.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\exclusive_builds.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\default_pre.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\default_pre.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\release.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\debug_and_release.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\default_post.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\default_post.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\build_pass.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\rtti.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\exceptions.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\stl.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\shared.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\warn_on.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\qt.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\thread.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\moc.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\win32\windows.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\resources.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\uic.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\yacc.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\lex.prf ..\..\..\Qt\2009.03\qt\mkspecs\features\include_source_dir.prf c:\Qt\2009.03\qt\lib\qtmain.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES clean: compiler_clean - -$(DEL_FILE) release\main.o release\mainwindow.o release\Document.o release\DomModel.o release\DomItem.o release\moc_mainwindow.o release\moc_Document.o release\moc_DomModel.o + -$(DEL_FILE) release\main.o release\mainwindow.o release\Document.o release\DomModel.o release\DomItem.o release\AtAGlance.o release\BuildStatus.o release\moc_mainwindow.o release\moc_Document.o release\moc_DomModel.o release\moc_AtAGlance.o distclean: clean -$(DEL_FILE) $(DESTDIR_TARGET) @@ -103,9 +109,9 @@ mocables: compiler_moc_header_make_all compiler_moc_source_make_all -compiler_moc_header_make_all: release/moc_mainwindow.cpp release/moc_Document.cpp release/moc_DomModel.cpp +compiler_moc_header_make_all: release/moc_mainwindow.cpp release/moc_Document.cpp release/moc_DomModel.cpp release/moc_AtAGlance.cpp compiler_moc_header_clean: - -$(DEL_FILE) release\moc_mainwindow.cpp release\moc_Document.cpp release\moc_DomModel.cpp + -$(DEL_FILE) release\moc_mainwindow.cpp release\moc_Document.cpp release\moc_DomModel.cpp release\moc_AtAGlance.cpp release/moc_mainwindow.cpp: Document.h \ DomModel.h \ mainwindow.h @@ -118,6 +124,10 @@ release/moc_DomModel.cpp: DomModel.h C:/Qt/2009.03/qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 DomModel.h -o release\moc_DomModel.cpp +release/moc_AtAGlance.cpp: BuildStatus.h \ + AtAGlance.h + C:/Qt/2009.03/qt/bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 AtAGlance.h -o release\moc_AtAGlance.cpp + compiler_rcc_make_all: compiler_rcc_clean: compiler_image_collection_make_all: qmake_image_collection.cpp @@ -148,7 +158,9 @@ DomModel.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\main.o main.cpp -release/mainwindow.o: mainwindow.cpp Document.h \ +release/mainwindow.o: mainwindow.cpp AtAGlance.h \ + BuildStatus.h \ + Document.h \ DomModel.h \ mainwindow.h \ ui_mainwindow.h @@ -165,6 +177,13 @@ release/DomItem.o: DomItem.cpp domitem.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\DomItem.o DomItem.cpp +release/AtAGlance.o: AtAGlance.cpp AtAGlance.h \ + BuildStatus.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\AtAGlance.o AtAGlance.cpp + +release/BuildStatus.o: BuildStatus.cpp BuildStatus.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\BuildStatus.o BuildStatus.cpp + release/moc_mainwindow.o: release/moc_mainwindow.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_mainwindow.o release\moc_mainwindow.cpp @@ -174,6 +193,9 @@ release/moc_DomModel.o: release/moc_DomModel.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_DomModel.o release\moc_DomModel.cpp +release/moc_AtAGlance.o: release/moc_AtAGlance.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_AtAGlance.o release\moc_AtAGlance.cpp + ####### Install install: FORCE diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/mainwindow.cpp --- a/BuildLogViewer/mainwindow.cpp Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/mainwindow.cpp Wed Sep 02 19:04:26 2009 -0700 @@ -1,6 +1,7 @@ #include #include +#include "AtAGlance.h" #include "Document.h" #include "mainwindow.h" #include "ui_mainwindow.h" @@ -43,11 +44,25 @@ doc->show(); } + void MainWindow::showStatus() + { + QString filename = QFileDialog::getOpenFileName( + this, tr("Open Log"), QDir::currentPath(), + tr("Build log *.xml;;All files (*.*)")); + AtAGlance *aag = new AtAGlance(filename, this); + workspace->addWindow(aag); + aag->traveAndPopulate(); + aag->decideOnLayout(); + aag->show(); + } + void MainWindow::createActions() { // file menu - mark as NYI + //connect(ui->actionOpen, SIGNAL(triggered()), + // this, SLOT(openLog())); connect(ui->actionOpen, SIGNAL(triggered()), - this, SLOT(openLog())); + this, SLOT(showStatus())); connect(ui->actionClose, SIGNAL(triggered()), workspace, SLOT(closeActiveWindow())); diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/mainwindow.h --- a/BuildLogViewer/mainwindow.h Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/mainwindow.h Wed Sep 02 19:04:26 2009 -0700 @@ -24,6 +24,7 @@ public slots: void notYetImplemented(); void openLog(); + void showStatus(); void enableActions(); void closeEvent(QCloseEvent *event); diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/readme.txt --- a/BuildLogViewer/readme.txt Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/readme.txt Wed Sep 02 19:04:26 2009 -0700 @@ -1,3 +1,18 @@ This program reads the build output log and presents it to the user. It makes liberal use of the "Simple DOM Model Example" example provided by Qt. -To test it out. build it with Qt Creator. Launch it and open one of the xml files in the test_data directory. \ No newline at end of file +To test it out. build it with Qt Creator. Launch it and open one of the xml files in the test_data directory. + +$ hg push +pushing to http://developer.symbian.org/oss/FCL/interim/contrib/QtExamples +searching for changes +http authorization required +realm: Symbian Foundation +user: johnk +password: +abort: HTTP Error 502: Bad Gateway + +JohnK@PC213502752220 /cygdrive/c/workspace/QtExamples +$ hg push +pushing to http://developer.symbian.org/oss/FCL/interim/contrib/QtExamples +searching for changes +no changes found \ No newline at end of file diff -r bbe0af256f1b -r 8e9c5760ce6f BuildLogViewer/test_data/build_log_232.xml --- a/BuildLogViewer/test_data/build_log_232.xml Fri Aug 28 15:16:29 2009 -0700 +++ b/BuildLogViewer/test_data/build_log_232.xml Wed Sep 02 19:04:26 2009 -0700 @@ -1,5 +1,6 @@ +System Definition file sf/app/organizer/package_definition.xml sbs: version 2.5.2 [2009-03-06 release] SBS_HOME C:/Symbian/Tools/PDT_1.0/raptor @@ -51,7 +52,6 @@ updating configuration make with variant last Buildable configuration 'winscw_udeb' Buildable configuration 'winscw_urel' -System Definition file sf/app/organizer/package_definition.xml Found 6 bld.inf references in sf/app/organizer/package_definition.xml within 1 layers: app Found 6 bld.inf references in layer "app"