Mercurial > hg > octave-terminal
changeset 13411:9969324c53c3
Added tooltips.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Tue, 12 Apr 2011 13:01:02 +0200 |
parents | 12697e9bb608 |
children | 6579e4c2769a |
files | gui//src/FileEditorMdiSubWindow.cpp gui//src/FileEditorMdiSubWindow.h |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gui//src/FileEditorMdiSubWindow.cpp +++ b/gui//src/FileEditorMdiSubWindow.cpp @@ -28,6 +28,18 @@ file.close(); } +void FileEditorMdiSubWindow::showToolTipSave() { + m_statusBar->showMessage("Save the file.", 2000); +} + +void FileEditorMdiSubWindow::showToolTipUndo() { + m_statusBar->showMessage("Revert previous changes.", 2000); +} + +void FileEditorMdiSubWindow::showToolTipRedo() { + m_statusBar->showMessage("Append previous changes.", 2000); +} + void FileEditorMdiSubWindow::construct() { QStyle *style = QApplication::style(); setWidget(new QWidget()); @@ -36,6 +48,7 @@ m_statusBar = new QStatusBar(this); m_codeEdit->setFontFamily("Courier"); + m_codeEdit->setLineWrapMode(QTextEdit::NoWrap); QAction *newAction = new QAction(style->standardIcon(QStyle::SP_FileIcon), "", m_toolBar); @@ -61,4 +74,8 @@ connect(undoAction, SIGNAL(triggered()), m_codeEdit, SLOT(undo())); connect(redoAction, SIGNAL(triggered()), m_codeEdit, SLOT(redo())); connect(saveAction, SIGNAL(triggered()), this, SLOT(saveFile())); + + connect(undoAction, SIGNAL(hovered()), this, SLOT(showToolTipUndo())); + connect(redoAction, SIGNAL(hovered()), this, SLOT(showToolTipRedo())); + connect(saveAction, SIGNAL(hovered()), this, SLOT(showToolTipSave())); }