- Added side pane for product preview and information - Product selection is done with a separate pushbutton, so that user gets a chance to preview the complete product information before committing to the selection - Supports two view modes: Grid View and List View - View mode is automatically stored in Settings, so it will default to the user's prefered mode - Should address most concerns in #109 and #142
This commit is contained in:
@@ -18,10 +18,12 @@
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "Template.h"
|
||||
|
||||
#include "Db.h"
|
||||
#include "FrameContinuous.h"
|
||||
#include "StrUtil.h"
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
@@ -190,6 +192,30 @@ namespace glabels
|
||||
}
|
||||
|
||||
|
||||
QString Template::paperDescription( const Units& units ) const
|
||||
{
|
||||
if ( mPaperId == "other" )
|
||||
{
|
||||
if ( units.toEnum() == Units::IN )
|
||||
{
|
||||
QString wStr = StrUtil::formatFraction( mPageWidth.in() );
|
||||
QString hStr = StrUtil::formatFraction( mPageHeight.in() );
|
||||
|
||||
return QString("%1 x %2 %3").arg(wStr).arg(hStr).arg(units.toTrName());
|
||||
}
|
||||
else
|
||||
{
|
||||
return QString("%1 x %2 %3")
|
||||
.arg(mPageWidth.inUnits(units), 0, 'g', 5)
|
||||
.arg(mPageHeight.inUnits(units), 0, 'g', 5)
|
||||
.arg(units.toTrName());
|
||||
}
|
||||
}
|
||||
|
||||
return Db::lookupPaperNameFromId( mPaperId );
|
||||
}
|
||||
|
||||
|
||||
QString Template::paperId() const
|
||||
{
|
||||
return mPaperId;
|
||||
|
||||
Reference in New Issue
Block a user