Commit 4415a36e authored by Pino Toscano's avatar Pino Toscano

rename the AnnotationItem to AnnotationToolItem, otherwise there's a plain...

rename the AnnotationItem to AnnotationToolItem, otherwise there's a plain conflict with the private class of the AnnotationModel

svn path=/trunk/KDE/kdegraphics/okular/; revision=710030
parent 23943436
......@@ -590,14 +590,14 @@ PageViewAnnotator::PageViewAnnotator( PageView * parent, Okular::Document * stor
{
m_toolsDefinition = doc.elementsByTagName("annotatingTools").item( 0 ).toElement();
// create the AnnotationItems from the XML dom tree
// create the AnnotationToolItems from the XML dom tree
QDomNode toolDescription = m_toolsDefinition.firstChild();
while ( toolDescription.isElement() )
{
QDomElement toolElement = toolDescription.toElement();
if ( toolElement.tagName() == "tool" )
{
AnnotationItem item;
AnnotationToolItem item;
item.id = toolElement.attribute("id").toInt();
item.text = toolElement.attribute("name");
item.pixmap = toolElement.attribute("pixmap");
......@@ -629,7 +629,7 @@ PageViewAnnotator::~PageViewAnnotator()
delete m_engine;
}
static QLinkedList<AnnotationItem> filteredItems( const QLinkedList<AnnotationItem> &items, bool textTools )
static QLinkedList<AnnotationToolItem> filteredItems( const QLinkedList<AnnotationToolItem> &items, bool textTools )
{
if ( textTools )
{
......@@ -637,8 +637,8 @@ static QLinkedList<AnnotationItem> filteredItems( const QLinkedList<AnnotationIt
}
else
{
QLinkedList<AnnotationItem> newitems;
QLinkedList<AnnotationItem>::ConstIterator it = items.begin(), itEnd = items.end();
QLinkedList<AnnotationToolItem> newitems;
QLinkedList<AnnotationToolItem>::ConstIterator it = items.begin(), itEnd = items.end();
for ( ; it != itEnd; ++it )
{
if ( !(*it).isText )
......
......@@ -74,7 +74,7 @@ class PageViewAnnotator : public QObject
PageViewToolBar * m_toolBar;
AnnotatorEngine * m_engine;
QDomElement m_toolsDefinition;
QLinkedList<AnnotationItem> m_items;
QLinkedList<AnnotationToolItem> m_items;
bool m_textToolsEnabled;
// creation related variables
......
......@@ -328,7 +328,7 @@ void PageViewTopMessage::setActionButton( QAction * action )
/** PageViewToolBar */
/*********************/
ToolBarButton::ToolBarButton( QWidget * parent, const AnnotationItem &item )
ToolBarButton::ToolBarButton( QWidget * parent, const AnnotationToolItem &item )
: QToolButton( parent ), m_id( item.id )
{
setCheckable( true );
......@@ -414,7 +414,7 @@ PageViewToolBar::~PageViewToolBar()
delete d;
}
void PageViewToolBar::setItems( const QLinkedList<AnnotationItem> &items )
void PageViewToolBar::setItems( const QLinkedList<AnnotationToolItem> &items )
{
// delete buttons if already present
if ( !d->buttons.isEmpty() )
......@@ -426,7 +426,7 @@ void PageViewToolBar::setItems( const QLinkedList<AnnotationItem> &items )
}
// create new buttons for given items
QLinkedList<AnnotationItem>::const_iterator it = items.begin(), end = items.end();
QLinkedList<AnnotationToolItem>::const_iterator it = items.begin(), end = items.end();
for ( ; it != end; ++it )
{
ToolBarButton * button = new ToolBarButton( this, *it );
......
......@@ -111,9 +111,9 @@ class PageViewTopMessage : public QWidget
};
struct AnnotationItem
struct AnnotationToolItem
{
AnnotationItem()
AnnotationToolItem()
: id( -1 ), isText( false )
{
}
......@@ -132,7 +132,7 @@ class ToolBarButton : public QToolButton
static const int iconSize = 32;
static const int buttonSize = 40;
ToolBarButton( QWidget * parent, const AnnotationItem &item );
ToolBarButton( QWidget * parent, const AnnotationToolItem &item );
int buttonID() const { return m_id; }
private:
......@@ -157,7 +157,7 @@ class PageViewToolBar : public QWidget
// animated widget controls
enum Side { Left = 0, Top = 1, Right = 2, Bottom = 3 };
void setItems( const QLinkedList<AnnotationItem> &items );
void setItems( const QLinkedList<AnnotationToolItem> &items );
void setSide( Side side );
void showAndAnimate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment