- setSelected(current);
- horizontalLayout->addWidget(list);
-
-#ifndef Q_WS_MAEMO_5
- QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Vertical);
- detailsButton = new QPushButton(tr("Details"), this);
- readButton = new QPushButton(tr("Read"), this);
- removeButton = new QPushButton(tr("Delete"), this);
- addButton = new QPushButton(tr("Add"), this);
-
- buttonBox->addButton(detailsButton, QDialogButtonBox::ActionRole);
- buttonBox->addButton(readButton, QDialogButtonBox::AcceptRole);
- buttonBox->addButton(removeButton, QDialogButtonBox::ActionRole);
- buttonBox->addButton(addButton, QDialogButtonBox::ActionRole);
- horizontalLayout->addWidget(buttonBox);
-#else
- QAction *addBookAction = menuBar()->addAction(tr("Add book"));
-#endif // Q_WS_MAEMO_5
-
- connect(Library::instance(), SIGNAL(nowReadingChanged()),
- this, SLOT(onCurrentBookChanged()));
- connect(Library::instance(),
- SIGNAL(rowsInserted(const QModelIndex &, int, int)),
- this,
- SLOT(onBookAdded()));
- connect(list, SIGNAL(activated(const QModelIndex &)),
+ setCurrentItem(sortedLibrary->mapFromSource(current));
+
+ // Search dialog box
+ searchDialog = new SearchDialog(this);
+ connect(Search::instance(), SIGNAL(endSearch()),
+ this, SLOT(showSearchResults()));
+
+ // Progress bar
+ progress = new ProgressDialog(tr("Adding books"), this);
+
+ connect(library, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(onBookAdded()));
+ connect(this, SIGNAL(activated(const QModelIndex &)),