void BookmarkOwner::openBookmark(const KBookmark &bookmark, Qt::MouseButtons mouseButtons, Qt::KeyboardModifiers keyboardModifiers) { if (keyboardModifiers & Qt::ControlModifier || mouseButtons & Qt::MiddleButton) loadBookmarkInNewTab(bookmark); else loadBookmark(bookmark); }
KAction* BookmarkOwner::createAction(const KBookmark &bookmark, const BookmarkAction &bmAction) { switch (bmAction) { case OPEN: return createAction(i18n("Open"), "tab-new", i18n("Open bookmark in current tab"), SLOT(loadBookmark(KBookmark)), bookmark); case OPEN_IN_TAB: return createAction(i18n("Open in New Tab"), "tab-new", i18n("Open bookmark in new tab"), SLOT(loadBookmarkInNewTab(KBookmark)), bookmark); case OPEN_IN_WINDOW: return createAction(i18n("Open in New Window"), "window-new", i18n("Open bookmark in new window"), SLOT(loadBookmarkInNewWindow(KBookmark)), bookmark); case OPEN_FOLDER: return createAction(i18n("Open Folder in Tabs"), "tab-new", i18n("Open all the bookmarks in folder in tabs"), SLOT(loadBookmarkFolder(KBookmark)), bookmark); case BOOKMARK_PAGE: return createAction(i18n("Add Bookmark"), "bookmark-new", i18n("Bookmark current page"), SLOT(bookmarkCurrentPage(KBookmark)), bookmark); case NEW_FOLDER: return createAction(i18n("New Folder"), "folder-new", i18n("Create a new bookmark folder"), SLOT(newBookmarkFolder(KBookmark)), bookmark); case NEW_SEPARATOR: return createAction(i18n("New Separator"), "edit-clear", i18n("Create a new bookmark separator"), SLOT(newSeparator(KBookmark)), bookmark); case COPY: return createAction(i18n("Copy Link"), "edit-copy", i18n("Copy the bookmark's link address"), SLOT(copyLink(KBookmark)), bookmark); case EDIT: return createAction(i18n("Edit"), "configure", i18n("Edit the bookmark"), SLOT(editBookmark(KBookmark)), bookmark); case DELETE: return createAction(i18n("Delete"), "edit-delete", i18n("Delete the bookmark"), SLOT(deleteBookmark(KBookmark)), bookmark); case SET_TOOLBAR_FOLDER: return createAction(i18n("Set as toolbar folder"), "bookmark-toolbar", "", SLOT(setToolBarFolder(KBookmark)), bookmark); case UNSET_TOOLBAR_FOLDER: return createAction(i18n("Unset this folder as the toolbar folder"), "bookmark-toolbar", "", SLOT(unsetToolBarFolder()), bookmark); default: ASSERT_NOT_REACHED(unknown BookmarkAction); return 0; } }
void BookmarkDialog::on_bookmarkButton_clicked(){ QString temp = (*(list.begin()+ui->bookmarkView->currentIndex().row())); //user's selection emit loadBookmark(temp); //emit the loadbookmark for the other ui and then close the window emit close(); }
FlyEmBodySplitProjectDialog::FlyEmBodySplitProjectDialog(QWidget *parent) : QDialog(parent), ui(new Ui::FlyEmBodySplitProjectDialog) { ui->setupUi(this); m_loadBodyDlg = NULL; //connect(this, SIGNAL(accepted()), this, SLOT(clear())); connect(ui->view2dBodyPushButton, SIGNAL(clicked()), this, SLOT(showData2d())); connect(ui->view3dBodyPushButton, SIGNAL(clicked()), this, SLOT(showData3d())); // connect(ui->viewSplitPushButton, // SIGNAL(clicked()), this, SLOT(showResult3d())); connect(ui->viewResultQuickPushButton, SIGNAL(clicked()), this, SLOT(showResult3dQuick())); connect(ui->donePushButton, SIGNAL(clicked()), this, SLOT(clear())); connect(ui->loadBodyPushButton, SIGNAL(clicked()), this, SLOT(loadBody())); connect(ui->loadBookmarkButton, SIGNAL(clicked()), this, SLOT(loadBookmark())); /* connect(ui->bookmarkVisibleCheckBox, SIGNAL(toggled(bool)), &m_project, SLOT(showBookmark(bool))); */ connect(ui->quickViewPushButton, SIGNAL(clicked()), this, SLOT(quickView())); connect(ui->fullGrayscaleCheckBox, SIGNAL(toggled(bool)), this, SLOT(viewFullGrayscale(bool))); connect(ui->updatePushButton, SIGNAL(clicked()), this, SLOT(viewFullGrayscale())); /* connect(ui->prevPushButton, SIGNAL(clicked()), this, SLOT(viewPreviousSlice())); connect(ui->nextPushButton, SIGNAL(clicked()), this, SLOT(viewNextSlice())); connect(ui->fullGrayscalePushButton, SIGNAL(clicked()), this, SLOT(viewFullGrayscale())); */ connect(ui->saveSeedPushButton, SIGNAL(clicked()), this, SLOT(saveSeed())); ui->bookmarkView->setModel(&m_bookmarkList); updateWidget(); m_project.setBookmarkVisible(ui->bookmarkVisibleCheckBox->isChecked()); m_sideViewScene = new QGraphicsScene(this); //m_sideViewScene->setSceneRect(0, 0, ui->sideView->width(), ui->sideView->height()); ui->sideView->setScene(m_sideViewScene); // ui->sideView->setFocus(); setFocusPolicy(Qt::StrongFocus); //ui->outputWidget->setText("Load a body to start."); #ifndef _DEBUG_ ui->pushButton->hide(); #endif m_dvidDlg = ZDialogFactory::makeDvidDialog(this); createMenu(); connectSignalSlot(); m_messageManager = NULL; }