fixed double click in table view

This commit is contained in:
Luis Ángel San Martín 2014-10-10 10:14:04 +02:00
parent c118da91e6
commit a25818a0ca
2 changed files with 7 additions and 0 deletions

View File

@ -67,6 +67,7 @@ ClassicComicsView::ClassicComicsView(QWidget *parent)
//connections---------------------------------------------
connect(tableView, SIGNAL(clicked(QModelIndex)), this, SLOT(centerComicFlow(QModelIndex)));
connect(tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(selectedComicForOpening(QModelIndex)));
connect(comicFlow, SIGNAL(centerIndexChanged(int)), this, SLOT(updateTableView(int)));
connect(tableView, SIGNAL(comicRated(int,QModelIndex)), this, SIGNAL(comicRated(int,QModelIndex)));
connect(comicFlow, SIGNAL(selected(uint)), this, SIGNAL(selected(uint)));
@ -226,6 +227,11 @@ void ClassicComicsView::selectAll()
tableView->selectAll();
}
void ClassicComicsView::selectedComicForOpening(const QModelIndex &mi)
{
emit selected(mi.row());
}
void ClassicComicsView::setShowMarks(bool show)
{
comicFlow->setShowMarks(show);

View File

@ -41,6 +41,7 @@ public slots:
//ComicsView
void setShowMarks(bool show);
void selectAll();
void selectedComicForOpening(const QModelIndex & mi);
private:
YACReaderTableView * tableView;