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

View File

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