improved last commit by using 'using' :)

This commit is contained in:
Thomas Jentzsch 2021-09-06 13:07:03 +02:00
parent d5dad489bf
commit 44c9b74345
3 changed files with 5 additions and 4 deletions

View File

@ -586,7 +586,7 @@ void DataGridWidget::handleCommand(CommandSender* sender, int cmd,
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DataGridWidget::setGridToolTip(int column, int row, const string& text)
void DataGridWidget::setToolTip(int column, int row, const string& text)
{
if(row >= 0 && row < _rows && column >= 0 && column < _cols)
_toolTipList[row * _cols + column] = text;

View File

@ -84,7 +84,8 @@ class DataGridWidget : public EditableWidget
void setCrossed(bool enable);
void setGridToolTip(int column, int row, const string& text);
using EditableWidget::setToolTip;
void setToolTip(int column, int row, const string& text);
string getToolTip(const Common::Point& pos) const override;
bool changedToolTip(const Common::Point& oldPos, const Common::Point& newPos) const override;

View File

@ -157,8 +157,8 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
}
xpos += t->getWidth() + _fontWidth / 2;
myTimRead = new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 4, 30, Common::Base::Fmt::_16);
myTimRead->setGridToolTip(0, 1, "Timer interrupt flag in bit 7.\n");
myTimRead->setGridToolTip(0, 2, "Number of CPU cycles since last TIMxxT write.\n");
myTimRead->setToolTip(0, 1, "Timer interrupt flag in bit 7.\n");
myTimRead->setToolTip(0, 2, "Number of CPU cycles since last TIMxxT write.\n");
myTimRead->setTarget(this);
myTimRead->setEditable(false);