Created PropertiesView page.

This commit is contained in:
Jim Evins
2016-03-26 20:30:50 -04:00
parent a6aa0d921f
commit 7d0b7868fe
18 changed files with 1185 additions and 900 deletions
+9 -21
View File
@@ -22,7 +22,7 @@
#include "MainWindow.h"
#include "LabelModel.h"
#include "NewLabelDialog.h"
#include "libglabels/Db.h"
#include "XmlLabelParser.h"
#include "XmlLabelCreator.h"
#include "FileUtil.h"
@@ -40,27 +40,15 @@ namespace glabels
///
void File::newLabel( MainWindow *window )
{
NewLabelDialog newDialog( window );
newDialog.exec();
// @TODO lookup latest template, if none default based on locale
const libglabels::Template* tmplate = libglabels::Db::lookupTemplateFromBrandPart( "Avery", "5159" );
LabelModel* label = new LabelModel();
label->setTmplate( tmplate );
label->setRotate( false );
const libglabels::Template* tmplate = newDialog.tmplate();
if ( tmplate )
{
LabelModel* label = new LabelModel();
label->setTmplate( tmplate );
label->setRotate( newDialog.rotate() );
if ( window->isEmpty() )
{
window->setModel( label );
}
else
{
MainWindow *newWindow = new MainWindow();
newWindow->setModel( label );
newWindow->show();
}
}
MainWindow *newWindow = new MainWindow();
newWindow->setModel( label );
newWindow->show();
}