Calc chars available when adding DXCC entity to decoded text line

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3539 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Murray Curtis
2013-08-09 03:17:04 +00:00
parent 7d198f3d50
commit db4d5f0141
3 changed files with 35 additions and 5 deletions
+12
View File
@@ -1,5 +1,7 @@
#include "logbook.h"
#include <QDebug>
#include <QFontMetrics>
void LogBook::init()
{
@@ -69,3 +71,13 @@ void LogBook::addAsWorked(const QString call)
if (countryName.length() > 0)
_worked.setAsWorked(countryName);
}
void LogBook::setDisplayFont(QFont font)
{
QFontMetrics qfm(font);
_fontWidth = qfm.averageCharWidth()+1; // the plus one is emperical
}