Added branches tool tips and frame preview.
This commit is contained in:
parent
82bd4b55a7
commit
8b1e42cf33
|
@ -2409,6 +2409,9 @@ void TasEditorWindow::updateToolTips(void)
|
|||
turboSeekCbox->setToolTip( tr("Uncheck when you need to watch seeking in slow motion") );
|
||||
autoRestoreCbox->setToolTip( tr("Whenever you change Input above Playback cursor, the cursor returns to where it was before the change") );
|
||||
|
||||
selectionLbl->setToolTip( tr("Current size of Selection") );
|
||||
clipboardLbl->setToolTip( tr("Current size of Input in the Clipboard") );
|
||||
|
||||
prevMkrBtn->setToolTip( tr("Send Selection to previous Marker (mouse: Ctrl+Wheel up) (hotkey: Ctrl+PageUp)") );
|
||||
nextMkrBtn->setToolTip( tr("Send Selection to next Marker (mouse: Ctrl+Wheel up) (hotkey: Ctrl+PageDown)") );
|
||||
similarBtn->setToolTip( tr("Auto-search for Marker Note") );
|
||||
|
@ -2440,6 +2443,9 @@ void TasEditorWindow::updateToolTips(void)
|
|||
turboSeekCbox->setToolTip( tr("") );
|
||||
autoRestoreCbox->setToolTip( tr("") );
|
||||
|
||||
selectionLbl->setToolTip( tr("") );
|
||||
clipboardLbl->setToolTip( tr("") );
|
||||
|
||||
prevMkrBtn->setToolTip( tr("") );
|
||||
nextMkrBtn->setToolTip( tr("") );
|
||||
similarBtn->setToolTip( tr("") );
|
||||
|
|
|
@ -974,13 +974,17 @@ bool BOOKMARKS::event(QEvent *event)
|
|||
item = (row_under_mouse + 1) % TOTAL_BOOKMARKS;
|
||||
item_valid = (item >= 0) && (item < TOTAL_BOOKMARKS);
|
||||
|
||||
if ( item_valid && bookmarks->bookmarksArray[item].notEmpty)
|
||||
if ( item_valid && (column == BOOKMARKSLIST_COLUMN_TIME) && bookmarks->bookmarksArray[item].notEmpty)
|
||||
{
|
||||
static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( helpEvent, new bookmarkPreviewPopup(item, this) ));
|
||||
//QToolTip::showText(helpEvent->globalPos(), tr(stmp), this );
|
||||
QToolTip::hideText();
|
||||
event->ignore();
|
||||
}
|
||||
else if ( taseditorConfig && taseditorConfig->tooltipsEnabled )
|
||||
{
|
||||
QToolTip::showText(helpEvent->globalPos(), tr("Right click = set Bookmark, Left click = jump to Bookmark or load Branch"), this );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ Branches - Manager of Branches
|
|||
#include <math.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include <QToolTip>
|
||||
#include <QFontMetrics>
|
||||
|
||||
#include "utils/xstring.h"
|
||||
|
@ -635,6 +636,33 @@ void BRANCHES::mouseMoveEvent(QMouseEvent * event)
|
|||
|
||||
}
|
||||
|
||||
bool BRANCHES::event(QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::ToolTip)
|
||||
{
|
||||
int item, item_valid;
|
||||
QHelpEvent *helpEvent = static_cast<QHelpEvent *>(event);
|
||||
|
||||
item = findItemUnderMouse( helpEvent->pos().x(), helpEvent->pos().y() );
|
||||
|
||||
item_valid = (item >= 0) && (item < TOTAL_BOOKMARKS);
|
||||
|
||||
if ( item_valid && bookmarks->bookmarksArray[item].notEmpty)
|
||||
{
|
||||
static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( helpEvent, new bookmarkPreviewPopup(item, this) ));
|
||||
//QToolTip::showText(helpEvent->globalPos(), tr(stmp), this );
|
||||
QToolTip::hideText();
|
||||
event->ignore();
|
||||
}
|
||||
else if ( taseditorConfig && taseditorConfig->tooltipsEnabled )
|
||||
{
|
||||
QToolTip::showText(helpEvent->globalPos(), tr("Right click = set Bookmark, single Left click = jump to Bookmark, double Left click = load Branch") );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return QWidget::event(event);
|
||||
}
|
||||
|
||||
void BRANCHES::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
int x,y;
|
||||
|
|
|
@ -145,6 +145,7 @@ protected:
|
|||
void mousePressEvent(QMouseEvent * event);
|
||||
void mouseReleaseEvent(QMouseEvent * event);
|
||||
void mouseMoveEvent(QMouseEvent * event);
|
||||
bool event(QEvent *event);
|
||||
|
||||
private:
|
||||
void calcFontData(void);
|
||||
|
|
Loading…
Reference in New Issue