// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
//
// JLH = James L. Hammons <jlhamm@acm.org>
//
#include "librarywidget.h"
-#include "rs_graphic.h"
+#include "drawing.h"
#include "rs_staticgraphicview.h"
#include "rs_system.h"
-#include "paintintf.h"
+#include "paintinterface.h"
LibraryWidget::LibraryWidget(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
QWidget(parent, flags), actionHandler(NULL)
{
}
-void LibraryWidget::setActionHandler(QG_ActionHandler * ah)
+void LibraryWidget::setActionHandler(ActionHandler * ah)
{
actionHandler = ah;
}
{
if (actionHandler != NULL)
{
- RS_ActionInterface * a = actionHandler->setCurrentAction(RS2::ActionLibraryInsert);
+ ActionInterface * a = actionHandler->setCurrentAction(RS2::ActionLibraryInsert);
if (a != NULL)
{
- RS_ActionLibraryInsert * action = (RS_ActionLibraryInsert *)a;
+ ActionLibraryInsert * action = (ActionLibraryInsert *)a;
action->setFile(dxfPath);
}
else
{
RS_DEBUG->print(RS_Debug::D_ERROR, "LibraryWidget::insert:"
- "Cannot create action RS_ActionLibraryInsert");
+ "Cannot create action ActionLibraryInsert");
}
}
}
* Appends the given directory to the given list view item. Called recursively until all
* library directories are appended.
*/
-void LibraryWidget::appendTree(QG_ListViewItem * item, QString directory)
+void LibraryWidget::appendTree(ListViewItem * item, QString directory)
{
#if 0
QStringList::Iterator it;
{
QStringList lDirectoryList = dir.entryList(QDir::Dirs, QDir::Name);
- QG_ListViewItem* newItem;
- QG_ListViewItem* searchItem;
+ ListViewItem* newItem;
+ ListViewItem* searchItem;
for(it=lDirectoryList.begin(); it!=lDirectoryList.end(); ++it)
{
// Look for an item already existing and take this
// instead of making a new one:
if (item != NULL)
- searchItem = (QG_ListViewItem *)item->firstChild();
+ searchItem = (ListViewItem *)item->firstChild();
else
- searchItem = (QG_ListViewItem *)lvDirectory->firstChild();
+ searchItem = (ListViewItem *)lvDirectory->firstChild();
while (searchItem != NULL)
{
break;
}
- searchItem = (QG_ListViewItem *)searchItem->nextSibling();
+ searchItem = (ListViewItem *)searchItem->nextSibling();
}
// Create new item if no existing was found:
if (newItem == NULL)
{
if (item)
- newItem = new QG_ListViewItem(item, (*it));
+ newItem = new ListViewItem(item, (*it));
else
- newItem = new QG_ListViewItem(lvDirectory, (*it));
+ newItem = new ListViewItem(lvDirectory, (*it));
}
appendTree(newItem, directory + "/" + (*it));
qpntr.eraseRect(0, 0, 128, 128);
RS_StaticGraphicView gv(128, 128, painter);
- RS_Graphic graphic;
+ Drawing graphic;
if (graphic.open(dxfPath, RS2::FormatUnknown))
{