예제 #1
0
int QgsTipFactory::position( QgsTip tip )
{
  for ( int i = 0; i < mAllTips.count(); ++i )
  {
    QgsTip myTip = mAllTips.at( i );
    if ( myTip.title() == tip.title() )
    {
      return i;
    }
  }
  return -1;
}
예제 #2
0
void QgsTipGui::showTip( QgsTip myTip )
{
  // TODO - This html construction can be simplified using QStringBuilder
  //        once Qt 4.6 is the minimum required version for building QGIS.
  //
  QString content = "<img src='"
                    + QgsApplication::appIconPath()
                    + "' style='float:left;'>"
                    + "<h2>"
                    + myTip.title()
                    + "</h2><br clear='all'/>"
                    + myTip.content();

  txtTip->setHtml( content );
}