Source Code (Use browser search to find items of interest.)
Class Index
kghostview'MarkList (./kdegraphics/kghostview/marklist.h:84)
class MarkList: public QWidget
{
Q_OBJECT
public:
MarkList( QWidget * parent = 0, const char * name = 0 );
~MarkList() { }
QStrList * markList();
void insertItem ( const char *text, int index=-1);
void setAutoUpdate ( bool enable );
void clear();
void setSelectColors( QColor bg, QColor fg );
const char *text( int index );
public slots:
void select(int index);
void markSelected();
void markAll();
void markEven();
void markOdd();
void toggleMarks();
void removeMarks();
signals:
void selected( int index );
protected:
void resizeEvent( QResizeEvent * );
private slots:
void selectSig(int index);
private:
QLabel *markLabel;
QLabel *pageLabel;
MarkListTable *listTable;
QPixmap flagPixmap();
};
kghostview'MarkList::MarkList() (./kdegraphics/kghostview/marklist.cpp:318)
MarkList::MarkList( QWidget * parent, const char * name)
: QWidget( parent, name )
{
listTable = new MarkListTable ( this );
listTable->setFocusProxy( this );
markLabel = new QLabel ( this );
markLabel->setFocusProxy( this );
markLabel->setFrameStyle( QFrame::Panel | QFrame::Raised );
markLabel->setLineWidth( 1 );
markLabel->setMargin( 1 );
markLabel->setPixmap( flagPixmap() );
pageLabel = new QLabel ( this );
pageLabel->setFocusProxy( this );
pageLabel->setFrameStyle( QFrame::Panel | QFrame::Raised );
pageLabel->setLineWidth( 1 );
pageLabel->setMargin( 1 );
pageLabel->setText( i18n("Page") );
connect ( listTable, SIGNAL( selected( int ) ),
this, SLOT( selectSig( int ) ) );
}
kghostview'MarkList::text() (./kdegraphics/kghostview/marklist.cpp:341)
const char * MarkList::text( int index )
{
return listTable->text( index );
}
kghostview'MarkList::setSelectColors() (./kdegraphics/kghostview/marklist.cpp:346)
void MarkList::setSelectColors( QColor bg, QColor fg )
{
listTable->selectColor = bg;
listTable->selectTextColor = fg;
}
kghostview'MarkList::resizeEvent() (./kdegraphics/kghostview/marklist.cpp:352)
void MarkList::resizeEvent( QResizeEvent * )
{
markLabel->setGeometry( 0,0, FLAG_WIDTH, listTable->rowHeight()+4 );
pageLabel->setGeometry( FLAG_WIDTH, 0,
width()-FLAG_WIDTH, listTable->rowHeight()+4 );
listTable->setGeometry( 0, pageLabel->height(),
width(), height()-(pageLabel->height()) );
}
kghostview'MarkList::insertItem() (./kdegraphics/kghostview/marklist.cpp:362)
void MarkList::insertItem ( const char *text, int index)
{
listTable->insertItem(text,index);
}
kghostview'MarkList::setAutoUpdate() (./kdegraphics/kghostview/marklist.cpp:367)
void MarkList::setAutoUpdate ( bool enable )
{
listTable->setAutoUpdate( enable );
}
kghostview'MarkList::clear() (./kdegraphics/kghostview/marklist.cpp:372)
void MarkList::clear()
{
listTable->clear();
}
kghostview'MarkList::select() (./kdegraphics/kghostview/marklist.cpp:377)
void MarkList::select(int index)
{
listTable->select( index );
}
kghostview'MarkList::selectSig() (./kdegraphics/kghostview/marklist.cpp:382)
void MarkList::selectSig(int index)
{
emit selected( index );
}
kghostview'MarkList::markSelected() (./kdegraphics/kghostview/marklist.cpp:387)
void MarkList::markSelected()
{
listTable->markSelected();
}
kghostview'MarkList::markAll() (./kdegraphics/kghostview/marklist.cpp:392)
void MarkList::markAll()
{
listTable->markAll();
}
kghostview'MarkList::markEven() (./kdegraphics/kghostview/marklist.cpp:397)
void MarkList::markEven()
{
listTable->markEven();
}
kghostview'MarkList::markOdd() (./kdegraphics/kghostview/marklist.cpp:402)
void MarkList::markOdd()
{
listTable->markOdd();
}
kghostview'MarkList::toggleMarks() (./kdegraphics/kghostview/marklist.cpp:407)
void MarkList::toggleMarks()
{
listTable->toggleMarks();
}
kghostview'MarkList::removeMarks() (./kdegraphics/kghostview/marklist.cpp:412)
void MarkList::removeMarks()
{
listTable->removeMarks();
}
kghostview'MarkList::markList() (./kdegraphics/kghostview/marklist.cpp:417)
QStrList* MarkList::markList()
{
return listTable->markList();
}
kghostview'MarkList::flagPixmap() (./kdegraphics/kghostview/marklist.cpp:422)
QPixmap MarkList::flagPixmap() {
QColorGroup cg = QApplication::palette().normal();
QPixmap pm;
pm.resize(16,16);
pm.fill( cg.background() );
int xOffset = 4;
int yOffset = 3;
QPainter p;
p.begin( &pm);
p.setPen( cg.text() );
p.drawLine( xOffset+4, yOffset, xOffset+4, yOffset+9 );
p.setPen( red );
p.drawLine( xOffset+3, yOffset+1, xOffset, yOffset+4 );
p.drawLine( xOffset+3, yOffset+1, xOffset+3, yOffset+4 );
p.drawLine( xOffset, yOffset+4, xOffset+3, yOffset+4 );
p.end();
return pm;
}