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 ...@@ -590,14 +590,14 @@ PageViewAnnotator::PageViewAnnotator( PageView * parent, Okular::Document * stor
{ {
m_toolsDefinition = doc.elementsByTagName("annotatingTools").item( 0 ).toElement(); 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(); QDomNode toolDescription = m_toolsDefinition.firstChild();
while ( toolDescription.isElement() ) while ( toolDescription.isElement() )
{ {
QDomElement toolElement = toolDescription.toElement(); QDomElement toolElement = toolDescription.toElement();
if ( toolElement.tagName() == "tool" ) if ( toolElement.tagName() == "tool" )
{ {
AnnotationItem item; AnnotationToolItem item;
item.id = toolElement.attribute("id").toInt(); item.id = toolElement.attribute("id").toInt();
item.text = toolElement.attribute("name"); item.text = toolElement.attribute("name");
item.pixmap = toolElement.attribute("pixmap"); item.pixmap = toolElement.attribute("pixmap");
...@@ -629,7 +629,7 @@ PageViewAnnotator::~PageViewAnnotator() ...@@ -629,7 +629,7 @@ PageViewAnnotator::~PageViewAnnotator()
delete m_engine; 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 ) if ( textTools )
{ {
...@@ -637,8 +637,8 @@ static QLinkedList<AnnotationItem> filteredItems( const QLinkedList<AnnotationIt ...@@ -637,8 +637,8 @@ static QLinkedList<AnnotationItem> filteredItems( const QLinkedList<AnnotationIt
} }
else else
{ {
QLinkedList<AnnotationItem> newitems; QLinkedList<AnnotationToolItem> newitems;
QLinkedList<AnnotationItem>::ConstIterator it = items.begin(), itEnd = items.end(); QLinkedList<AnnotationToolItem>::ConstIterator it = items.begin(), itEnd = items.end();
for ( ; it != itEnd; ++it ) for ( ; it != itEnd; ++it )
{ {
if ( !(*it).isText ) if ( !(*it).isText )
......
...@@ -74,7 +74,7 @@ class PageViewAnnotator : public QObject ...@@ -74,7 +74,7 @@ class PageViewAnnotator : public QObject
PageViewToolBar * m_toolBar; PageViewToolBar * m_toolBar;
AnnotatorEngine * m_engine; AnnotatorEngine * m_engine;
QDomElement m_toolsDefinition; QDomElement m_toolsDefinition;
QLinkedList<AnnotationItem> m_items; QLinkedList<AnnotationToolItem> m_items;
bool m_textToolsEnabled; bool m_textToolsEnabled;
// creation related variables // creation related variables
......
...@@ -328,7 +328,7 @@ void PageViewTopMessage::setActionButton( QAction * action ) ...@@ -328,7 +328,7 @@ void PageViewTopMessage::setActionButton( QAction * action )
/** PageViewToolBar */ /** PageViewToolBar */
/*********************/ /*********************/
ToolBarButton::ToolBarButton( QWidget * parent, const AnnotationItem &item ) ToolBarButton::ToolBarButton( QWidget * parent, const AnnotationToolItem &item )
: QToolButton( parent ), m_id( item.id ) : QToolButton( parent ), m_id( item.id )
{ {
setCheckable( true ); setCheckable( true );
...@@ -414,7 +414,7 @@ PageViewToolBar::~PageViewToolBar() ...@@ -414,7 +414,7 @@ PageViewToolBar::~PageViewToolBar()
delete d; delete d;
} }
void PageViewToolBar::setItems( const QLinkedList<AnnotationItem> &items ) void PageViewToolBar::setItems( const QLinkedList<AnnotationToolItem> &items )
{ {
// delete buttons if already present // delete buttons if already present
if ( !d->buttons.isEmpty() ) if ( !d->buttons.isEmpty() )
...@@ -426,7 +426,7 @@ void PageViewToolBar::setItems( const QLinkedList<AnnotationItem> &items ) ...@@ -426,7 +426,7 @@ void PageViewToolBar::setItems( const QLinkedList<AnnotationItem> &items )
} }
// create new buttons for given 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 ) for ( ; it != end; ++it )
{ {
ToolBarButton * button = new ToolBarButton( this, *it ); ToolBarButton * button = new ToolBarButton( this, *it );
......
...@@ -111,9 +111,9 @@ class PageViewTopMessage : public QWidget ...@@ -111,9 +111,9 @@ class PageViewTopMessage : public QWidget
}; };
struct AnnotationItem struct AnnotationToolItem
{ {
AnnotationItem() AnnotationToolItem()
: id( -1 ), isText( false ) : id( -1 ), isText( false )
{ {
} }
...@@ -132,7 +132,7 @@ class ToolBarButton : public QToolButton ...@@ -132,7 +132,7 @@ class ToolBarButton : public QToolButton
static const int iconSize = 32; static const int iconSize = 32;
static const int buttonSize = 40; static const int buttonSize = 40;
ToolBarButton( QWidget * parent, const AnnotationItem &item ); ToolBarButton( QWidget * parent, const AnnotationToolItem &item );
int buttonID() const { return m_id; } int buttonID() const { return m_id; }
private: private:
...@@ -157,7 +157,7 @@ class PageViewToolBar : public QWidget ...@@ -157,7 +157,7 @@ class PageViewToolBar : public QWidget
// animated widget controls // animated widget controls
enum Side { Left = 0, Top = 1, Right = 2, Bottom = 3 }; 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 setSide( Side side );
void showAndAnimate(); 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