mirror of https://github.com/CGAL/cgal
- Remove demo/icons/Logos.qrc, replaced by demo/resources/CGAL.qrc, that
also contains :/cgal/help/about_CGAL.html
- Add include/CGAL/Qt/debug.h and src/CGALQt/debug.cpp, that will contain
debug tools/functions. For the moment, they just define:
void traverse_resources(const QString& name);
that must be used like that:
CGAL::Qt:traverse_resources(":/cgal"); // view CGAL resources
or
CGAL::Qt:traverse_resources(":"); // view all resources
and displays the resources tree on std::cerr.
This commit is contained in:
parent
44c9e23466
commit
9f2384e77d
|
|
@ -1922,11 +1922,8 @@ GraphicsView/demo/Triangulation_2/icons/movingPoint.png -text
|
|||
GraphicsView/demo/icons/Delaunay_triangulation_2.png -text
|
||||
GraphicsView/demo/icons/File.qrc -text
|
||||
GraphicsView/demo/icons/Input.qrc -text
|
||||
GraphicsView/demo/icons/Logos.qrc -text
|
||||
GraphicsView/demo/icons/Triangulation_2.qrc -text
|
||||
GraphicsView/demo/icons/Voronoi_diagram_2.png -text
|
||||
GraphicsView/demo/icons/cgal_large_FAF8E8.gif -text svneol=unset#image/gif
|
||||
GraphicsView/demo/icons/cgal_logo.xpm -text
|
||||
GraphicsView/demo/icons/fileNew.png -text
|
||||
GraphicsView/demo/icons/fileOpen.png -text
|
||||
GraphicsView/demo/icons/fileSave.png -text
|
||||
|
|
@ -1934,7 +1931,10 @@ GraphicsView/demo/icons/inputPoint.png -text svneol=unset#image/png
|
|||
GraphicsView/demo/icons/inputPolyline.png -text
|
||||
GraphicsView/demo/icons/zoom-best-fit.png -text svneol=unset#image/png
|
||||
GraphicsView/demo/icons/zoom-best-fit.svg -text
|
||||
GraphicsView/demo/resources/CGAL.qrc -text
|
||||
GraphicsView/demo/resources/about_CGAL.html svneol=native#text/html
|
||||
GraphicsView/demo/resources/cgal_large_FAF8E8.gif -text svneol=unset#image/gif
|
||||
GraphicsView/demo/resources/cgal_logo.xpm -text
|
||||
GraphicsView/doc_tex/GraphicsView/uml-design.eps -text
|
||||
GraphicsView/doc_tex/GraphicsView/uml-design.graphml -text
|
||||
GraphicsView/doc_tex/GraphicsView/uml-design.pdf -text
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ int main(int argc, char **argv)
|
|||
Q_INIT_RESOURCE(File);
|
||||
Q_INIT_RESOURCE(Triangulation_2);
|
||||
Q_INIT_RESOURCE(Input);
|
||||
Q_INIT_RESOURCE(Logos);
|
||||
Q_INIT_RESOURCE(CGAL);
|
||||
|
||||
MainWindow mainWindow;
|
||||
mainWindow.show();
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ int main(int argc, char **argv)
|
|||
Q_INIT_RESOURCE(File);
|
||||
Q_INIT_RESOURCE(Triangulation_2);
|
||||
Q_INIT_RESOURCE(Input);
|
||||
Q_INIT_RESOURCE(Logos);
|
||||
Q_INIT_RESOURCE(CGAL);
|
||||
|
||||
MainWindow mainWindow;
|
||||
mainWindow.show();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<RCC>
|
||||
<qresource prefix="/cgal/logos" >
|
||||
<qresource prefix="/cgal/help" lang="en" >
|
||||
<file>about_CGAL.html</file>
|
||||
</qresource>
|
||||
<qresource prefix="/cgal/logos">
|
||||
<file alias="CGAL.gif" >cgal_large_FAF8E8.gif</file>
|
||||
<file alias="cgal_icon" >cgal_logo.xpm</file>
|
||||
</qresource>
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef CGAL_QT_DEBUG_H
|
||||
#define CGAL_QT_DEBUG_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Qt {
|
||||
|
||||
/**
|
||||
* Must be used like that:
|
||||
* CGAL::Qt:traverse_resources(":/cgal"); // view CGAL resources
|
||||
* or
|
||||
* CGAL::Qt:traverse_resources(":"); // view all resources
|
||||
* and displays the resources tree on std::cerr.
|
||||
*/
|
||||
void traverse_resources(const QString& name,
|
||||
const QString& dirname = QString(),
|
||||
int indent = 0);
|
||||
|
||||
} // namespace Qt
|
||||
} // namespace CGAL
|
||||
|
||||
|
||||
#endif // CGAL_QT_DEBUG_H
|
||||
|
|
@ -39,11 +39,11 @@ if(QT4_FOUND)
|
|||
qt4_generate_moc( ../../include/CGAL/Qt/GraphicsViewInput.h GraphicsViewInput_moc.cpp )
|
||||
|
||||
# qrc files (resources files, that contain icons, at least)
|
||||
qt4_add_resources ( RESOURCE_FILES ../../demo/icons/Input.qrc ../../demo/icons/File.qrc ../../demo/icons/Logos.qrc ../../demo/icons/Triangulation_2.qrc)
|
||||
qt4_add_resources ( RESOURCE_FILES ../../demo/resources/CGAL.qrc ../../demo/icons/Input.qrc ../../demo/icons/File.qrc ../../demo/icons/Triangulation_2.qrc)
|
||||
|
||||
set( CGAL_QT4_BASENAME CGAL-Qt4 )
|
||||
|
||||
add_library( CGAL_QT4 GraphicsViewInput_moc.cpp GraphicsViewNavigation.cpp GraphicsViewNavigation_moc.cpp GraphicsItem_moc.cpp GraphicsViewPolylineInput.cpp DemosMainWindow.cpp DemosMainWindow_moc.cpp ${RESOURCE_FILES} )
|
||||
add_library( CGAL_QT4 debug.cpp GraphicsViewInput_moc.cpp GraphicsViewNavigation.cpp GraphicsViewNavigation_moc.cpp GraphicsItem_moc.cpp GraphicsViewPolylineInput.cpp DemosMainWindow.cpp DemosMainWindow_moc.cpp ${RESOURCE_FILES} )
|
||||
target_link_libraries( CGAL_QT4 ${QT_LIBRARIES} )
|
||||
if ( NOT AUTO_LINK_ENABLED )
|
||||
# If auto-link is not enabled (on Linux for example), link with libCGAL explicitly.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
#include <CGAL/Qt/debug.h>
|
||||
#include <QDir>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Qt {
|
||||
|
||||
|
||||
void traverse_resources(const QString& name, const QString& dirname, int indent)
|
||||
{
|
||||
std::cerr << qPrintable(QString(indent, ' '))
|
||||
<< qPrintable(name);
|
||||
QString fullname =
|
||||
dirname.isEmpty() ?
|
||||
name :
|
||||
dirname + "/" + name;
|
||||
QDir dir(fullname);
|
||||
if(dir.exists()) {
|
||||
std::cerr << "/\n";
|
||||
Q_FOREACH(QString path, dir.entryList())
|
||||
{
|
||||
traverse_resources(path, fullname, indent + 2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::cerr << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
} // namesapce Qt
|
||||
} // namespace CGAL
|
||||
Loading…
Reference in New Issue