mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
change statusTip to toolTip
This commit is contained in:
parent
ed84e66bae
commit
5486929a8d
@ -12,7 +12,7 @@
|
||||
|
||||
const QString VConfigManager::orgName = QString("tamlok");
|
||||
const QString VConfigManager::appName = QString("vnote");
|
||||
const QString VConfigManager::c_version = QString("1.1");
|
||||
const QString VConfigManager::c_version = QString("1.2");
|
||||
const QString VConfigManager::dirConfigFileName = QString(".vnote.json");
|
||||
const QString VConfigManager::defaultConfigFilePath = QString(":/resources/vnote.ini");
|
||||
|
||||
|
@ -33,42 +33,42 @@ void VDirectoryTree::initActions()
|
||||
{
|
||||
newRootDirAct = new QAction(QIcon(":/resources/icons/create_rootdir.svg"),
|
||||
tr("New &Root Directory"), this);
|
||||
newRootDirAct->setStatusTip(tr("Create a new root directory in current notebook"));
|
||||
newRootDirAct->setToolTip(tr("Create a new root directory in current notebook"));
|
||||
connect(newRootDirAct, &QAction::triggered,
|
||||
this, &VDirectoryTree::newRootDirectory);
|
||||
|
||||
newSubDirAct = new QAction(tr("&New Sub-Directory"), this);
|
||||
newSubDirAct->setStatusTip(tr("Create a new sub-directory"));
|
||||
newSubDirAct->setToolTip(tr("Create a new sub-directory"));
|
||||
connect(newSubDirAct, &QAction::triggered,
|
||||
this, &VDirectoryTree::newSubDirectory);
|
||||
|
||||
deleteDirAct = new QAction(QIcon(":/resources/icons/delete_dir.svg"),
|
||||
tr("&Delete"), this);
|
||||
deleteDirAct->setStatusTip(tr("Delete selected directory"));
|
||||
deleteDirAct->setToolTip(tr("Delete selected directory"));
|
||||
connect(deleteDirAct, &QAction::triggered,
|
||||
this, &VDirectoryTree::deleteDirectory);
|
||||
|
||||
dirInfoAct = new QAction(QIcon(":/resources/icons/dir_info.svg"),
|
||||
tr("&Info"), this);
|
||||
dirInfoAct->setStatusTip(tr("View and edit current directory's information"));
|
||||
dirInfoAct->setToolTip(tr("View and edit current directory's information"));
|
||||
connect(dirInfoAct, &QAction::triggered,
|
||||
this, &VDirectoryTree::editDirectoryInfo);
|
||||
|
||||
copyAct = new QAction(QIcon(":/resources/icons/copy.svg"),
|
||||
tr("&Copy"), this);
|
||||
copyAct->setStatusTip(tr("Copy selected directories"));
|
||||
copyAct->setToolTip(tr("Copy selected directories"));
|
||||
connect(copyAct, &QAction::triggered,
|
||||
this, &VDirectoryTree::copySelectedDirectories);
|
||||
|
||||
cutAct = new QAction(QIcon(":/resources/icons/cut.svg"),
|
||||
tr("C&ut"), this);
|
||||
cutAct->setStatusTip(tr("Cut selected directories"));
|
||||
cutAct->setToolTip(tr("Cut selected directories"));
|
||||
connect(cutAct, &QAction::triggered,
|
||||
this, &VDirectoryTree::cutSelectedDirectories);
|
||||
|
||||
pasteAct = new QAction(QIcon(":/resources/icons/paste.svg"),
|
||||
tr("&Paste"), this);
|
||||
pasteAct->setStatusTip(tr("Paste directories under this directory"));
|
||||
pasteAct->setToolTip(tr("Paste directories under this directory"));
|
||||
connect(pasteAct, &QAction::triggered,
|
||||
this, &VDirectoryTree::pasteDirectoriesInCurDir);
|
||||
}
|
||||
@ -252,6 +252,7 @@ void VDirectoryTree::contextMenuRequested(QPoint pos)
|
||||
}
|
||||
|
||||
QMenu menu(this);
|
||||
menu.setToolTipsVisible(true);
|
||||
|
||||
if (!item) {
|
||||
// Context menu on the free space of the QTreeWidget
|
||||
|
@ -44,19 +44,19 @@ void VEditWindow::initTabActions()
|
||||
{
|
||||
m_locateAct = new QAction(QIcon(":/resources/icons/locate_note.svg"),
|
||||
tr("Locate To Directory"), this);
|
||||
m_locateAct->setStatusTip(tr("Locate the directory of current note"));
|
||||
m_locateAct->setToolTip(tr("Locate the directory of current note"));
|
||||
connect(m_locateAct, &QAction::triggered,
|
||||
this, &VEditWindow::handleLocateAct);
|
||||
|
||||
m_moveLeftAct = new QAction(QIcon(":/resources/icons/move_tab_left.svg"),
|
||||
tr("Move One Split Left"), this);
|
||||
m_moveLeftAct->setStatusTip(tr("Move current tab to the split on the left"));
|
||||
m_moveLeftAct->setToolTip(tr("Move current tab to the split on the left"));
|
||||
connect(m_moveLeftAct, &QAction::triggered,
|
||||
this, &VEditWindow::handleMoveLeftAct);
|
||||
|
||||
m_moveRightAct = new QAction(QIcon(":/resources/icons/move_tab_right.svg"),
|
||||
tr("Move One Split Right"), this);
|
||||
m_moveRightAct->setStatusTip(tr("Move current tab to the split on the right"));
|
||||
m_moveRightAct->setToolTip(tr("Move current tab to the split on the right"));
|
||||
connect(m_moveRightAct, &QAction::triggered,
|
||||
this, &VEditWindow::handleMoveRightAct);
|
||||
}
|
||||
@ -68,6 +68,7 @@ void VEditWindow::setupCornerWidget()
|
||||
"", this);
|
||||
leftBtn->setProperty("CornerBtn", true);
|
||||
VOpenedListMenu *leftMenu = new VOpenedListMenu(this);
|
||||
leftMenu->setToolTipsVisible(true);
|
||||
connect(leftMenu, &VOpenedListMenu::fileTriggered,
|
||||
this, &VEditWindow::tabListJump);
|
||||
leftBtn->setMenu(leftMenu);
|
||||
@ -77,13 +78,13 @@ void VEditWindow::setupCornerWidget()
|
||||
// Actions
|
||||
splitAct = new QAction(QIcon(":/resources/icons/split_window.svg"),
|
||||
tr("Split"), this);
|
||||
splitAct->setStatusTip(tr("Split current window vertically"));
|
||||
splitAct->setToolTip(tr("Split current window vertically"));
|
||||
connect(splitAct, &QAction::triggered,
|
||||
this, &VEditWindow::splitWindow);
|
||||
|
||||
removeSplitAct = new QAction(QIcon(":/resources/icons/remove_split.svg"),
|
||||
tr("Remove split"), this);
|
||||
removeSplitAct->setStatusTip(tr("Remove current split window"));
|
||||
removeSplitAct->setToolTip(tr("Remove current split window"));
|
||||
connect(removeSplitAct, &QAction::triggered,
|
||||
this, &VEditWindow::removeSplit);
|
||||
|
||||
@ -91,6 +92,7 @@ void VEditWindow::setupCornerWidget()
|
||||
"", this);
|
||||
rightBtn->setProperty("CornerBtn", true);
|
||||
QMenu *rightMenu = new QMenu(this);
|
||||
rightMenu->setToolTipsVisible(true);
|
||||
rightMenu->addAction(splitAct);
|
||||
rightMenu->addAction(removeSplitAct);
|
||||
rightBtn->setMenu(rightMenu);
|
||||
@ -421,6 +423,7 @@ void VEditWindow::mousePressEvent(QMouseEvent *event)
|
||||
void VEditWindow::contextMenuRequested(QPoint pos)
|
||||
{
|
||||
QMenu menu(this);
|
||||
menu.setToolTipsVisible(true);
|
||||
|
||||
if (canRemoveSplit()) {
|
||||
menu.addAction(removeSplitAct);
|
||||
@ -431,6 +434,7 @@ void VEditWindow::contextMenuRequested(QPoint pos)
|
||||
void VEditWindow::tabbarContextMenuRequested(QPoint p_pos)
|
||||
{
|
||||
QMenu menu(this);
|
||||
menu.setToolTipsVisible(true);
|
||||
|
||||
QTabBar *bar = tabBar();
|
||||
int tab = bar->tabAt(p_pos);
|
||||
|
@ -44,37 +44,37 @@ void VFileList::initActions()
|
||||
{
|
||||
newFileAct = new QAction(QIcon(":/resources/icons/create_note.svg"),
|
||||
tr("&New Note"), this);
|
||||
newFileAct->setStatusTip(tr("Create a note in current directory"));
|
||||
newFileAct->setToolTip(tr("Create a note in current directory"));
|
||||
connect(newFileAct, SIGNAL(triggered(bool)),
|
||||
this, SLOT(newFile()));
|
||||
|
||||
deleteFileAct = new QAction(QIcon(":/resources/icons/delete_note.svg"),
|
||||
tr("&Delete"), this);
|
||||
deleteFileAct->setStatusTip(tr("Delete selected note"));
|
||||
deleteFileAct->setToolTip(tr("Delete selected note"));
|
||||
connect(deleteFileAct, SIGNAL(triggered(bool)),
|
||||
this, SLOT(deleteFile()));
|
||||
|
||||
fileInfoAct = new QAction(QIcon(":/resources/icons/note_info.svg"),
|
||||
tr("&Info"), this);
|
||||
fileInfoAct->setStatusTip(tr("View and edit current note's information"));
|
||||
fileInfoAct->setToolTip(tr("View and edit current note's information"));
|
||||
connect(fileInfoAct, SIGNAL(triggered(bool)),
|
||||
this, SLOT(fileInfo()));
|
||||
|
||||
copyAct = new QAction(QIcon(":/resources/icons/copy.svg"),
|
||||
tr("&Copy"), this);
|
||||
copyAct->setStatusTip(tr("Copy selected notes"));
|
||||
copyAct->setToolTip(tr("Copy selected notes"));
|
||||
connect(copyAct, &QAction::triggered,
|
||||
this, &VFileList::copySelectedFiles);
|
||||
|
||||
cutAct = new QAction(QIcon(":/resources/icons/cut.svg"),
|
||||
tr("C&ut"), this);
|
||||
cutAct->setStatusTip(tr("Cut selected notes"));
|
||||
cutAct->setToolTip(tr("Cut selected notes"));
|
||||
connect(cutAct, &QAction::triggered,
|
||||
this, &VFileList::cutSelectedFiles);
|
||||
|
||||
pasteAct = new QAction(QIcon(":/resources/icons/paste.svg"),
|
||||
tr("&Paste"), this);
|
||||
pasteAct->setStatusTip(tr("Paste notes in current directory"));
|
||||
pasteAct->setToolTip(tr("Paste notes in current directory"));
|
||||
connect(pasteAct, &QAction::triggered,
|
||||
this, &VFileList::pasteFilesInCurDir);
|
||||
}
|
||||
@ -269,6 +269,7 @@ void VFileList::contextMenuRequested(QPoint pos)
|
||||
{
|
||||
QListWidgetItem *item = fileList->itemAt(pos);
|
||||
QMenu menu(this);
|
||||
menu.setToolTipsVisible(true);
|
||||
|
||||
if (!m_directory) {
|
||||
return;
|
||||
|
@ -304,21 +304,23 @@ void VMainWindow::initHelpMenu()
|
||||
void VMainWindow::initMarkdownMenu()
|
||||
{
|
||||
QMenu *markdownMenu = menuBar()->addMenu(tr("&Markdown"));
|
||||
markdownMenu->setToolTipsVisible(true);
|
||||
QMenu *converterMenu = markdownMenu->addMenu(tr("&Converter"));
|
||||
converterMenu->setToolTipsVisible(true);
|
||||
|
||||
QActionGroup *converterAct = new QActionGroup(this);
|
||||
QAction *markedAct = new QAction(tr("Marked"), converterAct);
|
||||
markedAct->setStatusTip(tr("Use Marked to convert Markdown to HTML (re-open current tabs to make it work)"));
|
||||
markedAct->setToolTip(tr("Use Marked to convert Markdown to HTML (re-open current tabs to make it work)"));
|
||||
markedAct->setCheckable(true);
|
||||
markedAct->setData(int(MarkdownConverterType::Marked));
|
||||
|
||||
QAction *hoedownAct = new QAction(tr("Hoedown"), converterAct);
|
||||
hoedownAct->setStatusTip(tr("Use Hoedown to convert Markdown to HTML (re-open current tabs to make it work)"));
|
||||
hoedownAct->setToolTip(tr("Use Hoedown to convert Markdown to HTML (re-open current tabs to make it work)"));
|
||||
hoedownAct->setCheckable(true);
|
||||
hoedownAct->setData(int(MarkdownConverterType::Hoedown));
|
||||
|
||||
QAction *markdownitAct = new QAction(tr("Markdown-it"), converterAct);
|
||||
markdownitAct->setStatusTip(tr("Use Markdown-it to convert Markdown to HTML (re-open current tabs to make it work)"));
|
||||
markdownitAct->setToolTip(tr("Use Markdown-it to convert Markdown to HTML (re-open current tabs to make it work)"));
|
||||
markdownitAct->setCheckable(true);
|
||||
markdownitAct->setData(int(MarkdownConverterType::MarkdownIt));
|
||||
|
||||
@ -349,7 +351,7 @@ void VMainWindow::initMarkdownMenu()
|
||||
initRenderBackgroundMenu(markdownMenu);
|
||||
|
||||
QAction *mermaidAct = new QAction(tr("&Mermaid Diagram"), this);
|
||||
mermaidAct->setStatusTip(tr("Enable Mermaid for graph and diagram"));
|
||||
mermaidAct->setToolTip(tr("Enable Mermaid for graph and diagram"));
|
||||
mermaidAct->setCheckable(true);
|
||||
connect(mermaidAct, &QAction::triggered,
|
||||
this, &VMainWindow::enableMermaid);
|
||||
@ -358,7 +360,7 @@ void VMainWindow::initMarkdownMenu()
|
||||
mermaidAct->setChecked(vconfig.getEnableMermaid());
|
||||
|
||||
QAction *mathjaxAct = new QAction(tr("Math&jax"), this);
|
||||
mathjaxAct->setStatusTip(tr("Enable Mathjax for math support in Markdown"));
|
||||
mathjaxAct->setToolTip(tr("Enable Mathjax for math support in Markdown"));
|
||||
mathjaxAct->setCheckable(true);
|
||||
connect(mathjaxAct, &QAction::triggered,
|
||||
this, &VMainWindow::enableMathjax);
|
||||
@ -375,11 +377,12 @@ void VMainWindow::initViewMenu()
|
||||
void VMainWindow::initFileMenu()
|
||||
{
|
||||
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
|
||||
fileMenu->setToolTipsVisible(true);
|
||||
|
||||
// Import notes from files.
|
||||
m_importNoteAct = new QAction(QIcon(":/resources/icons/import_note.svg"),
|
||||
tr("&Import Notes From Files"), this);
|
||||
m_importNoteAct->setStatusTip(tr("Import notes from files into current directory"));
|
||||
m_importNoteAct->setToolTip(tr("Import notes from files into current directory"));
|
||||
connect(m_importNoteAct, &QAction::triggered,
|
||||
this, &VMainWindow::importNoteFromFile);
|
||||
m_importNoteAct->setEnabled(false);
|
||||
@ -387,13 +390,13 @@ void VMainWindow::initFileMenu()
|
||||
// Settings.
|
||||
QAction *settingsAct = new QAction(QIcon(":/resources/icons/settings.svg"),
|
||||
tr("Settings"), this);
|
||||
settingsAct->setStatusTip(tr("View and change settings for VNote"));
|
||||
settingsAct->setToolTip(tr("View and change settings for VNote"));
|
||||
connect(settingsAct, &QAction::triggered,
|
||||
this, &VMainWindow::viewSettings);
|
||||
|
||||
// Exit.
|
||||
QAction *exitAct = new QAction(tr("Exit"), this);
|
||||
exitAct->setStatusTip(tr("Exit VNote"));
|
||||
exitAct->setToolTip(tr("Exit VNote"));
|
||||
exitAct->setShortcut(QKeySequence("Ctrl+Q"));
|
||||
connect(exitAct, &QAction::triggered,
|
||||
this, &VMainWindow::close);
|
||||
@ -408,59 +411,60 @@ void VMainWindow::initFileMenu()
|
||||
void VMainWindow::initEditMenu()
|
||||
{
|
||||
QMenu *editMenu = menuBar()->addMenu(tr("&Edit"));
|
||||
editMenu->setToolTipsVisible(true);
|
||||
|
||||
// Insert image.
|
||||
m_insertImageAct = new QAction(QIcon(":/resources/icons/insert_image.svg"),
|
||||
tr("Insert &Image"), this);
|
||||
m_insertImageAct->setStatusTip(tr("Insert an image from file into current note"));
|
||||
m_insertImageAct->setToolTip(tr("Insert an image from file into current note"));
|
||||
connect(m_insertImageAct, &QAction::triggered,
|
||||
this, &VMainWindow::insertImage);
|
||||
|
||||
// Find/Replace.
|
||||
m_findReplaceAct = new QAction(QIcon(":/resources/icons/find_replace.svg"),
|
||||
tr("Find/Replace"), this);
|
||||
m_findReplaceAct->setStatusTip(tr("Open Find/Replace dialog to search in current note"));
|
||||
m_findReplaceAct->setToolTip(tr("Open Find/Replace dialog to search in current note"));
|
||||
m_findReplaceAct->setShortcut(QKeySequence::Find);
|
||||
connect(m_findReplaceAct, &QAction::triggered,
|
||||
this, &VMainWindow::openFindDialog);
|
||||
|
||||
m_findNextAct = new QAction(tr("Find Next"), this);
|
||||
m_findNextAct->setStatusTip(tr("Find next occurence"));
|
||||
m_findNextAct->setToolTip(tr("Find next occurence"));
|
||||
m_findNextAct->setShortcut(QKeySequence::FindNext);
|
||||
connect(m_findNextAct, SIGNAL(triggered(bool)),
|
||||
m_findReplaceDialog, SLOT(findNext()));
|
||||
|
||||
m_findPreviousAct = new QAction(tr("Find Previous"), this);
|
||||
m_findPreviousAct->setStatusTip(tr("Find previous occurence"));
|
||||
m_findPreviousAct->setToolTip(tr("Find previous occurence"));
|
||||
m_findPreviousAct->setShortcut(QKeySequence::FindPrevious);
|
||||
connect(m_findPreviousAct, SIGNAL(triggered(bool)),
|
||||
m_findReplaceDialog, SLOT(findPrevious()));
|
||||
|
||||
m_replaceAct = new QAction(tr("Replace"), this);
|
||||
m_replaceAct->setStatusTip(tr("Replace current occurence"));
|
||||
m_replaceAct->setToolTip(tr("Replace current occurence"));
|
||||
m_replaceAct->setShortcut(QKeySequence::Replace);
|
||||
connect(m_replaceAct, SIGNAL(triggered(bool)),
|
||||
m_findReplaceDialog, SLOT(replace()));
|
||||
|
||||
m_replaceFindAct = new QAction(tr("Replace && Find"), this);
|
||||
m_replaceFindAct->setStatusTip(tr("Replace current occurence and find the next one"));
|
||||
m_replaceFindAct->setToolTip(tr("Replace current occurence and find the next one"));
|
||||
connect(m_replaceFindAct, SIGNAL(triggered(bool)),
|
||||
m_findReplaceDialog, SLOT(replaceFind()));
|
||||
|
||||
m_replaceAllAct = new QAction(tr("Replace All"), this);
|
||||
m_replaceAllAct->setStatusTip(tr("Replace all occurences in current note"));
|
||||
m_replaceAllAct->setToolTip(tr("Replace all occurences in current note"));
|
||||
connect(m_replaceAllAct, SIGNAL(triggered(bool)),
|
||||
m_findReplaceDialog, SLOT(replaceAll()));
|
||||
|
||||
QAction *searchedWordAct = new QAction(tr("Highlight Searched Pattern"), this);
|
||||
searchedWordAct->setStatusTip(tr("Highlight all occurences of searched pattern"));
|
||||
searchedWordAct->setToolTip(tr("Highlight all occurences of searched pattern"));
|
||||
searchedWordAct->setCheckable(true);
|
||||
connect(searchedWordAct, &QAction::triggered,
|
||||
this, &VMainWindow::changeHighlightSearchedWord);
|
||||
|
||||
// Expand Tab into spaces.
|
||||
QAction *expandTabAct = new QAction(tr("&Expand Tab"), this);
|
||||
expandTabAct->setStatusTip(tr("Expand entered Tab to spaces"));
|
||||
expandTabAct->setToolTip(tr("Expand entered Tab to spaces"));
|
||||
expandTabAct->setCheckable(true);
|
||||
connect(expandTabAct, &QAction::triggered,
|
||||
this, &VMainWindow::changeExpandTab);
|
||||
@ -468,15 +472,15 @@ void VMainWindow::initEditMenu()
|
||||
// Tab stop width.
|
||||
QActionGroup *tabStopWidthAct = new QActionGroup(this);
|
||||
QAction *twoSpaceTabAct = new QAction(tr("2 Spaces"), tabStopWidthAct);
|
||||
twoSpaceTabAct->setStatusTip(tr("Expand Tab to 2 spaces"));
|
||||
twoSpaceTabAct->setToolTip(tr("Expand Tab to 2 spaces"));
|
||||
twoSpaceTabAct->setCheckable(true);
|
||||
twoSpaceTabAct->setData(2);
|
||||
QAction *fourSpaceTabAct = new QAction(tr("4 Spaces"), tabStopWidthAct);
|
||||
fourSpaceTabAct->setStatusTip(tr("Expand Tab to 4 spaces"));
|
||||
fourSpaceTabAct->setToolTip(tr("Expand Tab to 4 spaces"));
|
||||
fourSpaceTabAct->setCheckable(true);
|
||||
fourSpaceTabAct->setData(4);
|
||||
QAction *eightSpaceTabAct = new QAction(tr("8 Spaces"), tabStopWidthAct);
|
||||
eightSpaceTabAct->setStatusTip(tr("Expand Tab to 8 spaces"));
|
||||
eightSpaceTabAct->setToolTip(tr("Expand Tab to 8 spaces"));
|
||||
eightSpaceTabAct->setCheckable(true);
|
||||
eightSpaceTabAct->setData(8);
|
||||
connect(tabStopWidthAct, &QActionGroup::triggered,
|
||||
@ -484,28 +488,28 @@ void VMainWindow::initEditMenu()
|
||||
|
||||
// Auto Indent.
|
||||
m_autoIndentAct = new QAction(tr("Auto Indent"), this);
|
||||
m_autoIndentAct->setStatusTip(tr("Indent automatically when inserting a new line"));
|
||||
m_autoIndentAct->setToolTip(tr("Indent automatically when inserting a new line"));
|
||||
m_autoIndentAct->setCheckable(true);
|
||||
connect(m_autoIndentAct, &QAction::triggered,
|
||||
this, &VMainWindow::changeAutoIndent);
|
||||
|
||||
// Auto List.
|
||||
QAction *autoListAct = new QAction(tr("Auto List"), this);
|
||||
autoListAct->setStatusTip(tr("Continue the list automatically when inserting a new line"));
|
||||
autoListAct->setToolTip(tr("Continue the list automatically when inserting a new line"));
|
||||
autoListAct->setCheckable(true);
|
||||
connect(autoListAct, &QAction::triggered,
|
||||
this, &VMainWindow::changeAutoList);
|
||||
|
||||
// Highlight current cursor line.
|
||||
QAction *cursorLineAct = new QAction(tr("Highlight Cursor Line"), this);
|
||||
cursorLineAct->setStatusTip(tr("Highlight current cursor line"));
|
||||
cursorLineAct->setToolTip(tr("Highlight current cursor line"));
|
||||
cursorLineAct->setCheckable(true);
|
||||
connect(cursorLineAct, &QAction::triggered,
|
||||
this, &VMainWindow::changeHighlightCursorLine);
|
||||
|
||||
// Highlight selected word.
|
||||
QAction *selectedWordAct = new QAction(tr("Highlight Selected Words"), this);
|
||||
selectedWordAct->setStatusTip(tr("Highlight all occurences of selected words"));
|
||||
selectedWordAct->setToolTip(tr("Highlight all occurences of selected words"));
|
||||
selectedWordAct->setCheckable(true);
|
||||
connect(selectedWordAct, &QAction::triggered,
|
||||
this, &VMainWindow::changeHighlightSelectedWord);
|
||||
@ -515,6 +519,7 @@ void VMainWindow::initEditMenu()
|
||||
m_insertImageAct->setEnabled(false);
|
||||
|
||||
QMenu *findReplaceMenu = editMenu->addMenu(tr("Find/Replace"));
|
||||
findReplaceMenu->setToolTipsVisible(true);
|
||||
findReplaceMenu->addAction(m_findReplaceAct);
|
||||
findReplaceMenu->addAction(m_findNextAct);
|
||||
findReplaceMenu->addAction(m_findPreviousAct);
|
||||
@ -525,7 +530,6 @@ void VMainWindow::initEditMenu()
|
||||
findReplaceMenu->addAction(searchedWordAct);
|
||||
searchedWordAct->setChecked(vconfig.getHighlightSearchedWord());
|
||||
|
||||
editMenu->addSeparator();
|
||||
m_findReplaceAct->setEnabled(false);
|
||||
m_findNextAct->setEnabled(false);
|
||||
m_findPreviousAct->setEnabled(false);
|
||||
@ -533,13 +537,16 @@ void VMainWindow::initEditMenu()
|
||||
m_replaceFindAct->setEnabled(false);
|
||||
m_replaceAllAct->setEnabled(false);
|
||||
|
||||
editMenu->addSeparator();
|
||||
editMenu->addAction(expandTabAct);
|
||||
if (vconfig.getIsExpandTab()) {
|
||||
expandTabAct->setChecked(true);
|
||||
} else {
|
||||
expandTabAct->setChecked(false);
|
||||
}
|
||||
|
||||
QMenu *tabStopWidthMenu = editMenu->addMenu(tr("Tab Stop Width"));
|
||||
tabStopWidthMenu->setToolTipsVisible(true);
|
||||
tabStopWidthMenu->addAction(twoSpaceTabAct);
|
||||
tabStopWidthMenu->addAction(fourSpaceTabAct);
|
||||
tabStopWidthMenu->addAction(eightSpaceTabAct);
|
||||
@ -724,9 +731,10 @@ void VMainWindow::initRenderBackgroundMenu(QMenu *menu)
|
||||
this, &VMainWindow::setRenderBackgroundColor);
|
||||
|
||||
QMenu *renderBgMenu = menu->addMenu(tr("&Rendering Background"));
|
||||
renderBgMenu->setToolTipsVisible(true);
|
||||
const QString &curBgColor = vconfig.getCurRenderBackgroundColor();
|
||||
QAction *tmpAct = new QAction(tr("System"), renderBackgroundAct);
|
||||
tmpAct->setStatusTip(tr("Use system's background color configuration for Markdown rendering"));
|
||||
tmpAct->setToolTip(tr("Use system's background color configuration for Markdown rendering"));
|
||||
tmpAct->setCheckable(true);
|
||||
tmpAct->setData("System");
|
||||
if (curBgColor == "System") {
|
||||
@ -737,7 +745,7 @@ void VMainWindow::initRenderBackgroundMenu(QMenu *menu)
|
||||
const QVector<VColor> &bgColors = vconfig.getPredefinedColors();
|
||||
for (int i = 0; i < bgColors.size(); ++i) {
|
||||
tmpAct = new QAction(bgColors[i].name, renderBackgroundAct);
|
||||
tmpAct->setStatusTip(tr("Set as the background color for Markdown rendering"));
|
||||
tmpAct->setToolTip(tr("Set as the background color for Markdown rendering"));
|
||||
tmpAct->setCheckable(true);
|
||||
tmpAct->setData(bgColors[i].name);
|
||||
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
|
||||
@ -753,6 +761,7 @@ void VMainWindow::initEditorBackgroundMenu(QMenu *menu)
|
||||
{
|
||||
QMenu *backgroundColorMenu = menu->addMenu(tr("&Background Color"));
|
||||
|
||||
backgroundColorMenu->setToolTipsVisible(true);
|
||||
QActionGroup *backgroundColorAct = new QActionGroup(this);
|
||||
connect(backgroundColorAct, &QActionGroup::triggered,
|
||||
this, &VMainWindow::setEditorBackgroundColor);
|
||||
@ -760,7 +769,7 @@ void VMainWindow::initEditorBackgroundMenu(QMenu *menu)
|
||||
// System background color
|
||||
const QString &curBgColor = vconfig.getCurBackgroundColor();
|
||||
QAction *tmpAct = new QAction(tr("System"), backgroundColorAct);
|
||||
tmpAct->setStatusTip(tr("Use system's background color configuration for editor"));
|
||||
tmpAct->setToolTip(tr("Use system's background color configuration for editor"));
|
||||
tmpAct->setCheckable(true);
|
||||
tmpAct->setData("System");
|
||||
if (curBgColor == "System") {
|
||||
@ -770,7 +779,7 @@ void VMainWindow::initEditorBackgroundMenu(QMenu *menu)
|
||||
const QVector<VColor> &bgColors = vconfig.getPredefinedColors();
|
||||
for (int i = 0; i < bgColors.size(); ++i) {
|
||||
tmpAct = new QAction(bgColors[i].name, backgroundColorAct);
|
||||
tmpAct->setStatusTip(tr("Set as the background color for editor"));
|
||||
tmpAct->setToolTip(tr("Set as the background color for editor"));
|
||||
tmpAct->setCheckable(true);
|
||||
tmpAct->setData(bgColors[i].name);
|
||||
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
|
||||
|
@ -53,13 +53,13 @@ void VNotebookSelector::initActions()
|
||||
{
|
||||
m_deleteNotebookAct = new QAction(QIcon(":/resources/icons/delete_notebook.svg"),
|
||||
tr("&Delete"), this);
|
||||
m_deleteNotebookAct->setStatusTip(tr("Delete current notebook"));
|
||||
m_deleteNotebookAct->setToolTip(tr("Delete current notebook"));
|
||||
connect(m_deleteNotebookAct, SIGNAL(triggered(bool)),
|
||||
this, SLOT(deleteNotebook()));
|
||||
|
||||
m_notebookInfoAct = new QAction(QIcon(":/resources/icons/notebook_info.svg"),
|
||||
tr("&Info"), this);
|
||||
m_notebookInfoAct->setStatusTip(tr("View and edit current notebook's information"));
|
||||
m_notebookInfoAct->setToolTip(tr("View and edit current notebook's information"));
|
||||
connect(m_notebookInfoAct, SIGNAL(triggered(bool)),
|
||||
this, SLOT(editNotebookInfo()));
|
||||
}
|
||||
@ -320,6 +320,7 @@ void VNotebookSelector::requestPopupListContextMenu(QPoint p_pos)
|
||||
item->setSelected(true);
|
||||
|
||||
QMenu menu(this);
|
||||
menu.setToolTipsVisible(true);
|
||||
menu.addAction(m_deleteNotebookAct);
|
||||
menu.addAction(m_notebookInfoAct);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user