ui.setupUi(this);
ui.lvDirectory->setColumnCount(1);
- QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
+ QStringList directoryList = SYSTEM->getDirectoryList("library");
#if 0
std::cout << "directorySize = " << directoryList.size() << std::endl;
}
else
{
- RS_DEBUG->print(RS_Debug::D_ERROR, "LibraryWidget::insert:"
+ DEBUG->print(Debug::D_ERROR, "LibraryWidget::insert:"
"Cannot create action ActionLibraryInsert");
}
}
}
else
{
- RS_DEBUG->print(RS_Debug::D_ERROR,
+ DEBUG->print(Debug::D_ERROR,
"LibraryWidget::insert: Can't read file: '%s'", dxfPath.toLatin1().data());
}
}
ui.ivPreview->clear();
// List of all directories that contain part libraries:
- QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
+ QStringList directoryList = SYSTEM->getDirectoryList("library");
QStringList::Iterator it;
QDir itemDir;
QStringList itemPathList;
if (item)
{
// List of all directories that contain part libraries:
- QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
+ QStringList directoryList = SYSTEM->getDirectoryList("library");
QStringList::Iterator it;
QDir itemDir;
QString LibraryWidget::getPathToPixmap(const QString & dir, const QString & dxfFile,
const QString & dxfPath)
{
- RS_DEBUG->print("LibraryWidget::getPathToPixmap: dir: '%s' dxfFile: '%s' dxfPath: '%s'",
+ DEBUG->print("LibraryWidget::getPathToPixmap: dir: '%s' dxfFile: '%s' dxfPath: '%s'",
dir.toLatin1().data(), dxfFile.toLatin1().data(), dxfPath.toLatin1().data());
// List of all directories that contain part libraries:
- QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
- directoryList.prepend(RS_SYSTEM->getHomeDir() + "/.architektonas/library");
+ QStringList directoryList = SYSTEM->getDirectoryList("library");
+ directoryList.prepend(SYSTEM->getHomeDir() + "/.architektonas/library");
QStringList::Iterator it;
QFileInfo fiDxf(dxfPath);
{
itemDir = (*it) + dir;
pngPath = itemDir + "/" + fiDxf.completeBaseName() + ".png";
- RS_DEBUG->print("LibraryWidget::getPathToPixmap: checking: '%s'",
+ DEBUG->print("LibraryWidget::getPathToPixmap: checking: '%s'",
pngPath.toLatin1().data());
QFileInfo fiPng(pngPath);
// the thumbnail exists:
if (fiPng.isFile())
{
- RS_DEBUG->print("LibraryWidget::getPathToPixmap: dxf date: %s, png date: %s",
+ DEBUG->print("LibraryWidget::getPathToPixmap: dxf date: %s, png date: %s",
fiDxf.lastModified().toString().toLatin1().data(), fiPng.lastModified().toString().toLatin1().data());
if (fiPng.lastModified() > fiDxf.lastModified())
{
- RS_DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail found: '%s'",
+ DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail found: '%s'",
pngPath.toLatin1().data());
return pngPath;
}
else
{
- RS_DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail needs to be updated: '%s'",
+ DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail needs to be updated: '%s'",
pngPath.toLatin1().data());
}
}
// The thumbnail must be created in the user's home.
// So, create all directories needed:
- RS_SYSTEM->createHomePath("/.architektonas/library" + dir);
- QString d = RS_SYSTEM->getHomeDir() + "/.architektonas/library" + dir;
+ SYSTEM->createHomePath("/.architektonas/library" + dir);
+ QString d = SYSTEM->getHomeDir() + "/.architektonas/library" + dir;
pngPath = d + "/" + fiDxf.completeBaseName() + ".png";
QPixmap buffer(128, 128);
qpntr.setBackground(Qt::white);
qpntr.eraseRect(0, 0, 128, 128);
- RS_StaticGraphicView view(128, 128, painter);
+ StaticGraphicView view(128, 128, painter);
Drawing drawing;
if (drawing.open(dxfPath, RS2::FormatUnknown))
{
- RS_Color black(0, 0, 0);
+ Color black(0, 0, 0);
// Set all pens in the drawing to BLACK
- for(RS_Entity * e=drawing.firstEntity(RS2::ResolveAll); e!=NULL; e=drawing.nextEntity(RS2::ResolveAll))
+ for(Entity * e=drawing.firstEntity(RS2::ResolveAll); e!=NULL; e=drawing.nextEntity(RS2::ResolveAll))
{
- RS_Pen pen = e->getPen();
+ Pen pen = e->getPen();
pen.setColor(black);
e->setPen(pen);
}
if (!writer.write(image))
{
- RS_DEBUG->print(RS_Debug::D_ERROR,
+ DEBUG->print(Debug::D_ERROR,
"LibraryWidget::getPathToPixmap: Cannot write thumbnail: '%s'",
pngPath.toLatin1().data());
pngPath = "";
}
else
{
- RS_DEBUG->print(RS_Debug::D_ERROR, "LibraryWidget::getPathToPixmap: Cannot open file: '%s'", dxfPath.toLatin1().data());
+ DEBUG->print(Debug::D_ERROR, "LibraryWidget::getPathToPixmap: Cannot open file: '%s'", dxfPath.toLatin1().data());
}
delete painter;