]> Shamusworld >> Repos - architektonas/commitdiff
Removed unnecessary class ListViewItem
authorShamus Hammons <jlhamm@acm.org>
Sat, 28 Aug 2010 15:37:12 +0000 (15:37 +0000)
committerShamus Hammons <jlhamm@acm.org>
Sat, 28 Aug 2010 15:37:12 +0000 (15:37 +0000)
architektonas.pro
src/widgets/listviewitem.cpp [deleted file]
src/widgets/listviewitem.h [deleted file]

index ad5706f75a478ff38fd452ead99bea9975b14579..3b99e2d9044ef301a9708dd8666cd5ffa241a406 100644 (file)
@@ -479,7 +479,6 @@ HEADERS += \
        src/widgets/layerbox.h \
        src/widgets/layerwidget.h \
        src/widgets/linetypebox.h \
-       src/widgets/listviewitem.h \
        src/widgets/qg_mainwindowinterface.h \
        src/widgets/patternbox.h \
        src/widgets/pentoolbar.h \
@@ -568,7 +567,6 @@ SOURCES += \
        src/widgets/layerbox.cpp \
        src/widgets/layerwidget.cpp \
        src/widgets/linetypebox.cpp \
-       src/widgets/listviewitem.cpp \
        src/widgets/patternbox.cpp \
        src/widgets/pentoolbar.cpp \
        src/widgets/recentfiles.cpp \
diff --git a/src/widgets/listviewitem.cpp b/src/widgets/listviewitem.cpp
deleted file mode 100644 (file)
index 612d461..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-// listviewitem.cpp
-//
-// Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
-// Extensively rewritten and refactored by James L. Hammons
-// 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>
-//
-// Who  When        What
-// ---  ----------  -----------------------------------------------------------
-// JLH  08/03/2010  Added this text. :-)
-//
-
-#include "listviewitem.h"
-
-#include <qpixmap.h>
-
-/**
- * Constructor for root items.
- */
-ListViewItem::ListViewItem(QListWidget * par, const QString & label,
-       bool open, int id): QListWidgetItem(par)
-{
-       par = 0;
-       this->label = label;
-       this->id = id;
-
-       setIcon(QIcon((open ? ":/res/folderopen.xpm" : ":/res/folderclosed.xpm")));
-       setOpen(open);
-}
-
-/**
- * Constructor for list view items with a folder icon.
- */
-ListViewItem::ListViewItem(ListViewItem * par, const QString & label,
-       bool open, int id): QListWidgetItem((QListWidget *)par)
-{
-       this->par = par;
-       this->label = label;
-       this->id = id;
-
-//     setPixmap(0, QPixmap((open ? folderopen_xpm : folderclosed_xpm)));
-//redundant:   setIcon(QIcon((open ? folderopen_xpm : folderclosed_xpm)));
-       setOpen(open);
-}
-
-/**
- * Opens or closes the item.
- */
-void ListViewItem::setOpen(bool open)
-{
-       if (open)
-//             setPixmap(0, QPixmap(folderopen_xpm));
-//             setIcon(QIcon(folderopen_xpm));
-               setIcon(QIcon(":/res/folderopen.xpm"));
-       else
-//             setPixmap(0, QPixmap(folderclosed_xpm));
-//             setIcon(QIcon(folderclosed_xpm));
-               setIcon(QIcon(":/res/folderclosed.xpm"));
-
-//     Q3ListViewItem::setOpen(open);
-#warning "!!!"
-//     QListWidgetItem::setOpen(open);
-}
-
-/**
- * Called in the beginning.
- */
-void ListViewItem::setup()
-{
-//     Q3ListViewItem::setup();
-#warning "!!!"
-//     QListWidgetItem::setup();
-}
-
-/**
- * Returns the "path" of this item (like: "Project/Page1/Paragraph1/").
- */
-QString ListViewItem::getFullPath()
-{
-       QString s;
-
-       if (par)
-       {
-               s = par->getFullPath();
-               s.append(text(0));
-               s.append("/");
-       }
-       else
-       {
-               s = text(0);
-               s.append("/");
-       }
-
-       return s;
-}
-
-/**
- * Returns the text of the given column of this item.
- */
-QString ListViewItem::text(int column) const
-{
-       if (column == 0)
-               return label;
-
-       return "Column1";
-}
-
-QString ListViewItem::getLabel() const
-{
-       return label;
-}
-
-void ListViewItem::setId(int id)
-{
-       this->id = id;
-}
-
-int ListViewItem::getId()
-{
-       return id;
-}
diff --git a/src/widgets/listviewitem.h b/src/widgets/listviewitem.h
deleted file mode 100644 (file)
index a96648a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef __LISTVIEWITEM_H__
-#define __LISTVIEWITEM_H__
-
-#include <QtGui>
-
-/**
- * An item in a hierarchical list view with a nice folder icon.
- */
-//class ListViewItem : public Q3ListViewItem
-class ListViewItem: public QListWidgetItem
-{
-       public:
-//             ListViewItem(Q3ListView * par, const QString & label,
-               ListViewItem(QListWidget * par, const QString & label,
-                       bool open = false, int id = -1);
-               ListViewItem(ListViewItem * par, const QString & label,
-                       bool open = false, int id = -1);
-
-               QString getFullPath();
-               QString text(int column) const;
-               QString getLabel() const;
-               void setOpen(bool o);
-               void setup();
-               void setId(int id);
-               int getId();
-
-       private:
-               ListViewItem * par;
-               QString label;
-               QString object;
-               int id;
-};
-
-#endif // __LISTVIEWITEM_H__