rename setSelected to setCurrent, as it clashes with a new function of Qt4.2

svn path=/trunk/playground/graphics/okular/; revision=597727
remotes/origin/KDE/4.0
Pino Toscano 20 years ago
parent 47423021dc
commit 1fabb1880d
  1. 2
      TODO
  2. 6
      ui/toc.cpp

@ -18,7 +18,7 @@ Bugs and wishes to close when moving okular to kdegraphics:
In progress [working on]: In progress [working on]:
-> toc: highlight the row of the current page (BR127358) -> toc: highlight the row of the current page (BR127358)
(check if there's a better way to do the highlighting - in case just edit TOCItem::setSelected()) (check if there's a better way to do the highlighting - in case just edit TOCItem::setCurrent())
-> thumbnailslist: show Viewport in(blended/contour) -> thumbnailslist: show Viewport in(blended/contour)
(actually it's only a red contour) (actually it's only a red contour)
-> annotations: renderers in PagePainter (for the 6 annots) -> annotations: renderers in PagePainter (for the 6 annots)

@ -53,7 +53,7 @@ class TOCItem : public QTreeWidgetItem
return m_element; return m_element;
} }
void setSelected( bool selected ) void setCurrent( bool selected )
{ {
setIcon( 0, selected ? KIcon( treeWidget()->layoutDirection() == Qt::RightToLeft ? "1leftarrow" : "1rightarrow" ) : QIcon() ); setIcon( 0, selected ? KIcon( treeWidget()->layoutDirection() == Qt::RightToLeft ? "1leftarrow" : "1rightarrow" ) : QIcon() );
} }
@ -139,7 +139,7 @@ void TOC::notifyViewportChanged( bool /*smoothMove*/ )
if ( m_current ) if ( m_current )
{ {
m_current->setSelected( false ); m_current->setCurrent( false );
m_current = 0; m_current = 0;
} }
@ -152,7 +152,7 @@ void TOC::notifyViewportChanged( bool /*smoothMove*/ )
{ {
m_current = tmp; m_current = tmp;
if (m_current) if (m_current)
m_current->setSelected( true ); m_current->setCurrent( true );
} }
++it; ++it;
} }

Loading…
Cancel
Save