Created PropertiesView page.
This commit is contained in:
@@ -34,17 +34,18 @@ set (glabels_sources
|
||||
MergeField.cpp
|
||||
MergePropertyEditor.cpp
|
||||
MergeRecord.cpp
|
||||
NewLabelDialog.cpp
|
||||
ObjectEditor.cpp
|
||||
Outline.cpp
|
||||
PageRenderer.cpp
|
||||
PrintView.cpp
|
||||
PropertiesView.cpp
|
||||
Preview.cpp
|
||||
PreviewOverlayItem.cpp
|
||||
SelectProductDialog.cpp
|
||||
SimplePreview.cpp
|
||||
TemplatePicker.cpp
|
||||
TemplatePickerItem.cpp
|
||||
TextNode.cpp
|
||||
SimplePreview.cpp
|
||||
View.cpp
|
||||
XmlLabelCreator.cpp
|
||||
XmlLabelParser.cpp
|
||||
@@ -70,20 +71,22 @@ set (glabels_qobject_headers
|
||||
MainWindow.h
|
||||
Merge.h
|
||||
MergePropertyEditor.h
|
||||
NewLabelDialog.h
|
||||
ObjectEditor.h
|
||||
PrintView.h
|
||||
PropertiesView.h
|
||||
Preview.h
|
||||
SelectProductDialog.h
|
||||
SimplePreview.h
|
||||
TemplatePicker.h
|
||||
View.h
|
||||
)
|
||||
|
||||
set (glabels_forms
|
||||
ui/NewLabelDialog.ui
|
||||
ui/ObjectEditor.ui
|
||||
ui/MergePropertyEditor.ui
|
||||
ui/ObjectEditor.ui
|
||||
ui/PrintView.ui
|
||||
ui/PropertiesView.ui
|
||||
ui/SelectProductDialog.ui
|
||||
)
|
||||
|
||||
set (glabels_resource_files
|
||||
|
||||
+4
-16
@@ -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,28 +40,16 @@ namespace glabels
|
||||
///
|
||||
void File::newLabel( MainWindow *window )
|
||||
{
|
||||
NewLabelDialog newDialog( window );
|
||||
newDialog.exec();
|
||||
|
||||
const libglabels::Template* tmplate = newDialog.tmplate();
|
||||
if ( tmplate )
|
||||
{
|
||||
// @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( newDialog.rotate() );
|
||||
label->setRotate( false );
|
||||
|
||||
if ( window->isEmpty() )
|
||||
{
|
||||
window->setModel( label );
|
||||
}
|
||||
else
|
||||
{
|
||||
MainWindow *newWindow = new MainWindow();
|
||||
newWindow->setModel( label );
|
||||
newWindow->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ namespace glabels
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static void newLabel( MainWindow *window );
|
||||
static void newLabel( MainWindow *window = 0 );
|
||||
static void open( MainWindow *window );
|
||||
static bool save( MainWindow *window );
|
||||
static bool saveAs( MainWindow *window );
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "libglabels/Db.h"
|
||||
#include "PropertiesView.h"
|
||||
#include "View.h"
|
||||
#include "ObjectEditor.h"
|
||||
#include "MergePropertyEditor.h"
|
||||
@@ -63,11 +64,13 @@ namespace glabels
|
||||
createMenus();
|
||||
createToolBars();
|
||||
|
||||
QWidget* propertiesPage = createPropertiesPage();
|
||||
QWidget* editorPage = createEditorPage();
|
||||
QWidget* mergePage = createMergePage();
|
||||
QWidget* printPage = createPrintPage();
|
||||
|
||||
mNotebook = new QTabWidget();
|
||||
mNotebook->addTab( propertiesPage, "Properties" );
|
||||
mNotebook->addTab( editorPage, "Editor" );
|
||||
mNotebook->addTab( mergePage, "Merge" );
|
||||
mNotebook->addTab( printPage, "Print" );
|
||||
@@ -111,6 +114,7 @@ namespace glabels
|
||||
void MainWindow::setModel( LabelModel *label )
|
||||
{
|
||||
mModel = label;
|
||||
mPropertiesView->setModel( mModel );
|
||||
mView->setModel( mModel );
|
||||
mObjectEditor->setModel( mModel );
|
||||
mPrintView->setModel( mModel );
|
||||
@@ -618,6 +622,17 @@ namespace glabels
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Create Properties Page
|
||||
///
|
||||
QWidget* MainWindow::createPropertiesPage()
|
||||
{
|
||||
mPropertiesView = new PropertiesView();
|
||||
|
||||
return mPropertiesView;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Create Editor Page
|
||||
///
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace glabels
|
||||
{
|
||||
// Forward References
|
||||
class LabelModel;
|
||||
class PropertiesView;
|
||||
class View;
|
||||
class ObjectEditor;
|
||||
class MergePropertyEditor;
|
||||
@@ -154,6 +155,7 @@ namespace glabels
|
||||
void createToolBars();
|
||||
void createStatusBar();
|
||||
|
||||
QWidget* createPropertiesPage();
|
||||
QWidget* createEditorPage();
|
||||
QWidget* createMergePage();
|
||||
QWidget* createPrintPage();
|
||||
@@ -200,6 +202,7 @@ namespace glabels
|
||||
|
||||
QTabWidget* mNotebook;
|
||||
LabelModel* mModel;
|
||||
PropertiesView* mPropertiesView;
|
||||
QScrollArea* mViewScrollArea;
|
||||
View* mView;
|
||||
ObjectEditor* mObjectEditor;
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
/* NewLabelDialog.cpp
|
||||
*
|
||||
* Copyright (C) 2013-2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
* This file is part of gLabels-qt.
|
||||
*
|
||||
* gLabels-qt is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* gLabels-qt is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "NewLabelDialog.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "libglabels/Db.h"
|
||||
#include "TemplatePickerItem.h"
|
||||
|
||||
|
||||
namespace glabels
|
||||
{
|
||||
|
||||
///
|
||||
/// Constructor
|
||||
///
|
||||
NewLabelDialog::NewLabelDialog( QWidget *parent )
|
||||
: QDialog(parent), mCanceled(false)
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
// TODO: Set default based on locale and/or saved preferences
|
||||
// Perhaps move to checkboxes
|
||||
pageSizeIsoCheck->setChecked( false );
|
||||
pageSizeUsCheck->setChecked( true );
|
||||
pageSizeOtherCheck->setChecked( true );
|
||||
|
||||
QList<libglabels::Template*> tmplates = libglabels::Db::templates();
|
||||
templatePicker->setTemplates( tmplates );
|
||||
|
||||
templatePicker->applyFilter( searchEntry->text(),
|
||||
pageSizeIsoCheck->isChecked(),
|
||||
pageSizeUsCheck->isChecked(),
|
||||
pageSizeOtherCheck->isChecked() );
|
||||
|
||||
similarBrowser->setAttribute(Qt::WA_TranslucentBackground);
|
||||
similarBrowser->viewport()->setAutoFillBackground(false);
|
||||
|
||||
selectionStackedWidget->setCurrentIndex( 0 );
|
||||
}
|
||||
|
||||
///
|
||||
/// Get selected template
|
||||
///
|
||||
const libglabels::Template* NewLabelDialog::tmplate() const
|
||||
{
|
||||
if ( !mCanceled )
|
||||
{
|
||||
return templatePicker->selectedTemplate();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Get rotation selection
|
||||
///
|
||||
bool NewLabelDialog::rotate() const
|
||||
{
|
||||
return orientationRotatedRadio->isChecked();
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Search Entry Text Changed Slot
|
||||
///
|
||||
void NewLabelDialog::onSearchEntryTextChanged()
|
||||
{
|
||||
templatePicker->applyFilter( searchEntry->text(),
|
||||
pageSizeIsoCheck->isChecked(),
|
||||
pageSizeUsCheck->isChecked(),
|
||||
pageSizeOtherCheck->isChecked() );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Search Entry Text Changed Slot
|
||||
///
|
||||
void NewLabelDialog::onSearchClearButtonClicked()
|
||||
{
|
||||
searchEntry->setText( "" );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Page Size Check Toggled Slot
|
||||
///
|
||||
void NewLabelDialog::onPageSizeCheckToggled()
|
||||
{
|
||||
templatePicker->applyFilter( searchEntry->text(),
|
||||
pageSizeIsoCheck->isChecked(),
|
||||
pageSizeUsCheck->isChecked(),
|
||||
pageSizeOtherCheck->isChecked() );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Template Picker Selection Changed Slot
|
||||
///
|
||||
void NewLabelDialog::onTemplatePickerSelectionChanged()
|
||||
{
|
||||
orientationNormalRadio->setChecked( true );
|
||||
|
||||
const libglabels::Template *tmplate = templatePicker->selectedTemplate();
|
||||
|
||||
if ( tmplate == NULL )
|
||||
{
|
||||
createButton->setEnabled( false );
|
||||
selectionStackedWidget->setCurrentIndex( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
createButton->setEnabled( true );
|
||||
selectionStackedWidget->setCurrentIndex( 1 );
|
||||
|
||||
const libglabels::Frame *frame = tmplate->frames().first();
|
||||
|
||||
simplePreview->setTemplate( tmplate );
|
||||
simplePreview->setRotate( false );
|
||||
|
||||
const libglabels::Vendor *vendor = libglabels::Db::lookupVendorFromName( tmplate->brand() );
|
||||
if ( (vendor != NULL) && (vendor->url() != NULL) )
|
||||
{
|
||||
QString markup = "<a href='" + vendor->url() + "'>" + vendor->name() + "</a>";
|
||||
vendorLabel->setText( markup );
|
||||
}
|
||||
else
|
||||
{
|
||||
vendorLabel->setText( tmplate->brand() );
|
||||
}
|
||||
|
||||
if ( tmplate->productUrl() != NULL )
|
||||
{
|
||||
QString markup = "<a href='" + tmplate->productUrl() + "'>" + tmplate->part() + "</a>";
|
||||
partLabel->setText( markup );
|
||||
}
|
||||
else
|
||||
{
|
||||
partLabel->setText( tmplate->part() );
|
||||
}
|
||||
|
||||
descriptionLabel->setText( tmplate->description() );
|
||||
|
||||
QString pgSizeString = libglabels::Db::lookupPaperNameFromId( tmplate->paperId() );
|
||||
pageSizeLabel->setText( pgSizeString );
|
||||
|
||||
QString labelSizeString = frame->sizeDescription( libglabels::Distance::Units::IN );
|
||||
labelSizeLabel->setText( labelSizeString );
|
||||
|
||||
QString layoutString = frame->layoutDescription();
|
||||
layoutLabel->setText( layoutString );
|
||||
|
||||
QStringList list = libglabels::Db::getNameListOfSimilarTemplates( tmplate->name() );
|
||||
if ( list.isEmpty() )
|
||||
{
|
||||
similarLabel->hide();
|
||||
similarBrowser->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
similarLabel->show();
|
||||
similarBrowser->show();
|
||||
|
||||
QString similarListString;
|
||||
foreach ( QString name, list )
|
||||
{
|
||||
similarListString += name + "\n";
|
||||
}
|
||||
similarBrowser->setText( similarListString );
|
||||
}
|
||||
|
||||
orientationGroupBox->setEnabled( frame->w() != frame->h() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Orientation Radio Button Toggled Slot
|
||||
///
|
||||
void NewLabelDialog::onOrientationRadioToggled()
|
||||
{
|
||||
simplePreview->setRotate( orientationRotatedRadio->isChecked() );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Create Button Clicked Slot
|
||||
///
|
||||
void NewLabelDialog::onCreateButtonClicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Cancel Button Clicked Slot
|
||||
///
|
||||
void NewLabelDialog::onCancelButtonClicked()
|
||||
{
|
||||
mCanceled = true;
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
/* PropertiesView.cpp
|
||||
*
|
||||
* Copyright (C) 2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
* This file is part of gLabels-qt.
|
||||
*
|
||||
* gLabels-qt is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* gLabels-qt is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PropertiesView.h"
|
||||
|
||||
#include "LabelModel.h"
|
||||
|
||||
#include "libglabels/Db.h"
|
||||
#include "SelectProductDialog.h"
|
||||
#include <QtDebug>
|
||||
|
||||
|
||||
namespace glabels
|
||||
{
|
||||
|
||||
///
|
||||
/// Constructor
|
||||
///
|
||||
PropertiesView::PropertiesView( QWidget *parent )
|
||||
: QWidget(parent), mModel(0)
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
similarBrowser->setAttribute(Qt::WA_TranslucentBackground);
|
||||
similarBrowser->viewport()->setAutoFillBackground(false);
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Destructor
|
||||
///
|
||||
PropertiesView::~PropertiesView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Set Model
|
||||
///
|
||||
void PropertiesView::setModel( LabelModel* model )
|
||||
{
|
||||
mModel = model;
|
||||
|
||||
connect( mModel, SIGNAL(sizeChanged()), this, SLOT(onLabelSizeChanged()) );
|
||||
|
||||
onLabelSizeChanged();
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Label size changed handler
|
||||
///
|
||||
void PropertiesView::onLabelSizeChanged()
|
||||
{
|
||||
const libglabels::Template *tmplate = mModel->tmplate();
|
||||
const libglabels::Frame *frame = tmplate->frames().first();
|
||||
bool isRotated = mModel->rotate();
|
||||
|
||||
preview->setTemplate( tmplate );
|
||||
preview->setRotate( isRotated );
|
||||
|
||||
const libglabels::Vendor *vendor = libglabels::Db::lookupVendorFromName( tmplate->brand() );
|
||||
if ( (vendor != NULL) && (vendor->url() != NULL) )
|
||||
{
|
||||
QString markup = "<a href='" + vendor->url() + "'>" + vendor->name() + "</a>";
|
||||
vendorLabel->setText( markup );
|
||||
}
|
||||
else
|
||||
{
|
||||
vendorLabel->setText( tmplate->brand() );
|
||||
}
|
||||
|
||||
if ( tmplate->productUrl() != NULL )
|
||||
{
|
||||
QString markup = "<a href='" + tmplate->productUrl() + "'>" + tmplate->part() + "</a>";
|
||||
partLabel->setText( markup );
|
||||
}
|
||||
else
|
||||
{
|
||||
partLabel->setText( tmplate->part() );
|
||||
}
|
||||
|
||||
descriptionLabel->setText( tmplate->description() );
|
||||
|
||||
QString pgSizeString = libglabels::Db::lookupPaperNameFromId( tmplate->paperId() );
|
||||
pageSizeLabel->setText( pgSizeString );
|
||||
|
||||
QString labelSizeString = frame->sizeDescription( libglabels::Distance::Units::IN );
|
||||
labelSizeLabel->setText( labelSizeString );
|
||||
|
||||
QString layoutString = frame->layoutDescription();
|
||||
layoutLabel->setText( layoutString );
|
||||
|
||||
QStringList list = libglabels::Db::getNameListOfSimilarTemplates( tmplate->name() );
|
||||
if ( list.isEmpty() )
|
||||
{
|
||||
similarProductsGroupBox->hide();
|
||||
similarProductsNullBox->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
similarProductsGroupBox->show();
|
||||
similarProductsNullBox->hide();
|
||||
|
||||
QString similarListString;
|
||||
foreach ( QString name, list )
|
||||
{
|
||||
similarListString += name + "\n";
|
||||
}
|
||||
similarBrowser->setText( similarListString );
|
||||
}
|
||||
|
||||
orientationCombo->setEnabled( frame->w() != frame->h() );
|
||||
if ( frame->w() == frame->h() )
|
||||
{
|
||||
orientationCombo->setCurrentIndex(0);
|
||||
}
|
||||
else if ( frame->w() > frame->h() )
|
||||
{
|
||||
orientationCombo->setCurrentIndex( isRotated ? 1 : 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
orientationCombo->setCurrentIndex( isRotated ? 0 : 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Form changed handler
|
||||
///
|
||||
void PropertiesView::onFormChanged()
|
||||
{
|
||||
const libglabels::Template *tmplate = mModel->tmplate();
|
||||
const libglabels::Frame *frame = tmplate->frames().first();
|
||||
|
||||
if ( frame->w() == frame->h() )
|
||||
{
|
||||
mModel->setRotate( false );
|
||||
}
|
||||
else if ( frame->w() > frame->h() )
|
||||
{
|
||||
int index = orientationCombo->currentIndex();
|
||||
mModel->setRotate( index == 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
int index = orientationCombo->currentIndex();
|
||||
mModel->setRotate( index == 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Change Product Button Clicked handler
|
||||
///
|
||||
void PropertiesView::onChangeProductButtonClicked()
|
||||
{
|
||||
SelectProductDialog selectProductDialog( this );
|
||||
selectProductDialog.exec();
|
||||
|
||||
const libglabels::Template* tmplate = selectProductDialog.tmplate();
|
||||
if ( tmplate )
|
||||
{
|
||||
mModel->setTmplate( tmplate );
|
||||
|
||||
// Don't rotate circular or round labels
|
||||
const libglabels::Frame *frame = tmplate->frames().first();
|
||||
if ( frame->w() == frame->h() )
|
||||
{
|
||||
mModel->setRotate( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/* PropertiesView.h
|
||||
*
|
||||
* Copyright (C) 2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
* This file is part of gLabels-qt.
|
||||
*
|
||||
* gLabels-qt is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* gLabels-qt is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef glabels_PropertiesView_h
|
||||
#define glabels_PropertiesView_h
|
||||
|
||||
#include "ui_PropertiesView.h"
|
||||
|
||||
|
||||
namespace glabels
|
||||
{
|
||||
class LabelModel; // Forward reference
|
||||
|
||||
|
||||
///
|
||||
/// Properties View Widget
|
||||
///
|
||||
class PropertiesView : public QWidget, public Ui_PropertiesView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Life Cycle
|
||||
/////////////////////////////////
|
||||
public:
|
||||
PropertiesView( QWidget *parent = 0 );
|
||||
~PropertiesView();
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Public methods
|
||||
/////////////////////////////////
|
||||
void setModel( LabelModel* model );
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Slots
|
||||
/////////////////////////////////
|
||||
private slots:
|
||||
void onLabelSizeChanged();
|
||||
void onFormChanged();
|
||||
void onChangeProductButtonClicked();
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Private Data
|
||||
/////////////////////////////////
|
||||
private:
|
||||
LabelModel* mModel;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // glabels_PropertiesView_h
|
||||
@@ -0,0 +1,133 @@
|
||||
/* SelectProductDialog.cpp
|
||||
*
|
||||
* Copyright (C) 2013-2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
* This file is part of gLabels-qt.
|
||||
*
|
||||
* gLabels-qt is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* gLabels-qt is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "SelectProductDialog.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "libglabels/Db.h"
|
||||
#include "TemplatePickerItem.h"
|
||||
|
||||
|
||||
namespace glabels
|
||||
{
|
||||
|
||||
///
|
||||
/// Constructor
|
||||
///
|
||||
SelectProductDialog::SelectProductDialog( QWidget *parent )
|
||||
: QDialog(parent), mCanceled(false)
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
// TODO: Set default based on locale and/or saved preferences
|
||||
// Perhaps move to checkboxes
|
||||
pageSizeIsoCheck->setChecked( false );
|
||||
pageSizeUsCheck->setChecked( true );
|
||||
pageSizeOtherCheck->setChecked( true );
|
||||
|
||||
QList<libglabels::Template*> tmplates = libglabels::Db::templates();
|
||||
templatePicker->setTemplates( tmplates );
|
||||
|
||||
templatePicker->applyFilter( searchEntry->text(),
|
||||
pageSizeIsoCheck->isChecked(),
|
||||
pageSizeUsCheck->isChecked(),
|
||||
pageSizeOtherCheck->isChecked() );
|
||||
}
|
||||
|
||||
///
|
||||
/// Get selected template
|
||||
///
|
||||
const libglabels::Template* SelectProductDialog::tmplate() const
|
||||
{
|
||||
if ( !mCanceled )
|
||||
{
|
||||
return templatePicker->selectedTemplate();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Search Entry Text Changed Slot
|
||||
///
|
||||
void SelectProductDialog::onSearchEntryTextChanged()
|
||||
{
|
||||
templatePicker->applyFilter( searchEntry->text(),
|
||||
pageSizeIsoCheck->isChecked(),
|
||||
pageSizeUsCheck->isChecked(),
|
||||
pageSizeOtherCheck->isChecked() );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Search Entry Text Changed Slot
|
||||
///
|
||||
void SelectProductDialog::onSearchClearButtonClicked()
|
||||
{
|
||||
searchEntry->setText( "" );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Page Size Check Toggled Slot
|
||||
///
|
||||
void SelectProductDialog::onPageSizeCheckToggled()
|
||||
{
|
||||
templatePicker->applyFilter( searchEntry->text(),
|
||||
pageSizeIsoCheck->isChecked(),
|
||||
pageSizeUsCheck->isChecked(),
|
||||
pageSizeOtherCheck->isChecked() );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Template Picker Selection Changed Slot
|
||||
///
|
||||
void SelectProductDialog::onTemplatePickerSelectionChanged()
|
||||
{
|
||||
const libglabels::Template *tmplate = templatePicker->selectedTemplate();
|
||||
|
||||
selectButton->setEnabled( tmplate != NULL );
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Select Button Clicked Slot
|
||||
///
|
||||
void SelectProductDialog::onSelectButtonClicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Cancel Button Clicked Slot
|
||||
///
|
||||
void SelectProductDialog::onCancelButtonClicked()
|
||||
{
|
||||
mCanceled = true;
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/* NewLabelDialog.h
|
||||
/* SelectProductDialog.h
|
||||
*
|
||||
* Copyright (C) 2013 Jim Evins <evins@snaught.com>
|
||||
* Copyright (C) 2013-2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
* This file is part of gLabels-qt.
|
||||
*
|
||||
@@ -18,10 +18,10 @@
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef glabels_NewLabelDialog_h
|
||||
#define glabels_NewLabelDialog_h
|
||||
#ifndef glabels_SelectProductDialog_h
|
||||
#define glabels_SelectProductDialog_h
|
||||
|
||||
#include "ui_NewLabelDialog.h"
|
||||
#include "ui_SelectProductDialog.h"
|
||||
|
||||
|
||||
namespace glabels
|
||||
@@ -30,7 +30,7 @@ namespace glabels
|
||||
///
|
||||
/// New Label Dialog Widget
|
||||
///
|
||||
class NewLabelDialog : public QDialog, public Ui_NewLabelDialog
|
||||
class SelectProductDialog : public QDialog, public Ui_SelectProductDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -39,14 +39,13 @@ namespace glabels
|
||||
// Life Cycle
|
||||
/////////////////////////////////
|
||||
public:
|
||||
NewLabelDialog( QWidget *parent = 0 );
|
||||
SelectProductDialog( QWidget *parent = 0 );
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Accessors
|
||||
/////////////////////////////////
|
||||
const libglabels::Template* tmplate() const;
|
||||
bool rotate() const;
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
@@ -57,8 +56,7 @@ namespace glabels
|
||||
void onSearchClearButtonClicked();
|
||||
void onPageSizeCheckToggled();
|
||||
void onTemplatePickerSelectionChanged();
|
||||
void onOrientationRadioToggled();
|
||||
void onCreateButtonClicked();
|
||||
void onSelectButtonClicked();
|
||||
void onCancelButtonClicked();
|
||||
|
||||
|
||||
@@ -72,4 +70,4 @@ namespace glabels
|
||||
|
||||
}
|
||||
|
||||
#endif // glabels_NewLabelDialog_h
|
||||
#endif // glabels_SelectProductDialog_h
|
||||
@@ -1,6 +1,6 @@
|
||||
/* glabels_main.cpp
|
||||
*
|
||||
* Copyright (C) 2011 Jim Evins <evins@snaught.com>
|
||||
* Copyright (C) 2013-2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
* This file is part of gLabels-qt.
|
||||
*
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "File.h"
|
||||
#include "libglabels/Db.h"
|
||||
|
||||
using namespace glabels;
|
||||
@@ -46,8 +46,7 @@ int main( int argc, char **argv )
|
||||
#endif
|
||||
/////////////////////////////////
|
||||
|
||||
MainWindow mainWin;
|
||||
mainWin.show();
|
||||
File::newLabel();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@
|
||||
<file>icons/24x24/actions/fallback-zoom-out.png</file>
|
||||
<file>icons/24x24/apps/glabels.png</file>
|
||||
<file>icons/32x32/apps/glabels.png</file>
|
||||
<file>icons/32x32/actions/horizontal-orientation.png</file>
|
||||
<file>icons/32x32/actions/select-product.png</file>
|
||||
<file>icons/32x32/actions/vertical-orientation.png</file>
|
||||
<file>icons/48x48/apps/glabels.png</file>
|
||||
<file>icons/scalable/apps/glabels.svg</file>
|
||||
</qresource>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 330 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 334 B |
@@ -1,633 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>NewLabelDialog</class>
|
||||
<widget class="QDialog" name="NewLabelDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>991</width>
|
||||
<height>720</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchEntry">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchClearButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/16x16/actions/edit-clear.png</normaloff>:/icons/16x16/actions/edit-clear.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>146</width>
|
||||
<height>87</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Page size</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pageSizeIsoCheck">
|
||||
<property name="text">
|
||||
<string>ISO sizes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pageSizeUsCheck">
|
||||
<property name="text">
|
||||
<string>US sizes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pageSizeOtherCheck">
|
||||
<property name="text">
|
||||
<string>Other</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="glabels::TemplatePicker" name="templatePicker">
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="selectionStackedWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>No selection</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="glabels::SimplePreview" name="simplePreview">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>350</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Vendor:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="vendorLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Part #:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="partLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="descriptionLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Page size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="pageSizeLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Label size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="labelSizeLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Layout:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="layoutLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="similarLabel">
|
||||
<property name="text">
|
||||
<string>Similar to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QTextBrowser" name="similarBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="openLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="orientationGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Orientation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="orientationNormalRadio">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="orientationRotatedRadio">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rotated</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>&Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="createButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>C&reate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>glabels::TemplatePicker</class>
|
||||
<extends>QListWidget</extends>
|
||||
<header>TemplatePicker.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>glabels::SimplePreview</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>SimplePreview.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>searchEntry</sender>
|
||||
<signal>textChanged(QString)</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onSearchEntryTextChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>69</x>
|
||||
<y>48</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>2</x>
|
||||
<y>53</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>searchClearButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onSearchClearButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>177</x>
|
||||
<y>52</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>190</x>
|
||||
<y>7</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pageSizeIsoCheck</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>78</x>
|
||||
<y>116</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>3</x>
|
||||
<y>110</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pageSizeUsCheck</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>52</x>
|
||||
<y>145</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>8</x>
|
||||
<y>144</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pageSizeOtherCheck</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>37</x>
|
||||
<y>170</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>10</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>templatePicker</sender>
|
||||
<signal>itemSelectionChanged()</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onTemplatePickerSelectionChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>232</x>
|
||||
<y>550</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>244</x>
|
||||
<y>697</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>orientationRotatedRadio</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onOrientationRadioToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>901</x>
|
||||
<y>637</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>982</x>
|
||||
<y>617</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>orientationNormalRadio</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onOrientationRadioToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>807</x>
|
||||
<y>644</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>982</x>
|
||||
<y>592</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>createButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onCreateButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>951</x>
|
||||
<y>699</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>985</x>
|
||||
<y>671</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewLabelDialog</receiver>
|
||||
<slot>onCancelButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>837</x>
|
||||
<y>692</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>767</x>
|
||||
<y>704</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>onSearchClearButtonClicked()</slot>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<slot>onTemplatePickerSelectionChanged()</slot>
|
||||
<slot>onOrientationRadioToggled()</slot>
|
||||
<slot>onCreateButtonClicked()</slot>
|
||||
<slot>onSearchEntryTextChanged()</slot>
|
||||
<slot>onCancelButtonClicked()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
@@ -0,0 +1,403 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PropertiesView</class>
|
||||
<widget class="QWidget" name="PropertiesView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>793</width>
|
||||
<height>769</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="glabels::SimplePreview" name="preview">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="productGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Product</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Vendor:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="vendorLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Part #:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="partLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="descriptionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Page size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="pageSizeLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Label size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="labelSizeLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Layout:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="layoutLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="changeProductButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">text-align:left; padding:3px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Select another product</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/32x32/actions/select-product.png</normaloff>:/icons/32x32/actions/select-product.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="orientationGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Orientation</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QComboBox" name="orientationCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Horizontal orientation</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/32x32/actions/horizontal-orientation.png</normaloff>:/icons/32x32/actions/horizontal-orientation.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Vertical orientation</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/32x32/actions/vertical-orientation.png</normaloff>:/icons/32x32/actions/vertical-orientation.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="similarProductsGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Similar Products</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextBrowser" name="similarBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="similarProductsNullBox" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>glabels::SimplePreview</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>SimplePreview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>orientationCombo</sender>
|
||||
<signal>currentIndexChanged(int)</signal>
|
||||
<receiver>PropertiesView</receiver>
|
||||
<slot>onFormChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>671</x>
|
||||
<y>283</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>723</x>
|
||||
<y>285</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>changeProductButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>PropertiesView</receiver>
|
||||
<slot>onChangeProductButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>684</x>
|
||||
<y>192</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>728</x>
|
||||
<y>201</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>onChangeProductButtonClicked()</slot>
|
||||
<slot>onFormChanged()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
@@ -0,0 +1,332 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SelectProductDialog</class>
|
||||
<widget class="QDialog" name="SelectProductDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>690</width>
|
||||
<height>720</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchEntry">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchClearButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/16x16/actions/edit-clear.png</normaloff>:/icons/16x16/actions/edit-clear.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>146</width>
|
||||
<height>87</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Page size</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pageSizeIsoCheck">
|
||||
<property name="text">
|
||||
<string>ISO sizes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pageSizeUsCheck">
|
||||
<property name="text">
|
||||
<string>US sizes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pageSizeOtherCheck">
|
||||
<property name="text">
|
||||
<string>Other</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="glabels::TemplatePicker" name="templatePicker">
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>&Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="selectButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Select</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>glabels::TemplatePicker</class>
|
||||
<extends>QListWidget</extends>
|
||||
<header>TemplatePicker.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>searchEntry</sender>
|
||||
<signal>textChanged(QString)</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onSearchEntryTextChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>69</x>
|
||||
<y>48</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>2</x>
|
||||
<y>53</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>searchClearButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onSearchClearButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>177</x>
|
||||
<y>52</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>190</x>
|
||||
<y>7</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pageSizeIsoCheck</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>78</x>
|
||||
<y>116</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>3</x>
|
||||
<y>110</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pageSizeUsCheck</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>52</x>
|
||||
<y>145</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>8</x>
|
||||
<y>144</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pageSizeOtherCheck</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>37</x>
|
||||
<y>170</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>10</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>templatePicker</sender>
|
||||
<signal>itemSelectionChanged()</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onTemplatePickerSelectionChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>232</x>
|
||||
<y>550</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>244</x>
|
||||
<y>697</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onCancelButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>587</x>
|
||||
<y>708</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>689</x>
|
||||
<y>704</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>selectButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>SelectProductDialog</receiver>
|
||||
<slot>onSelectButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>660</x>
|
||||
<y>689</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>687</x>
|
||||
<y>682</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>onSearchClearButtonClicked()</slot>
|
||||
<slot>onPageSizeCheckToggled()</slot>
|
||||
<slot>onTemplatePickerSelectionChanged()</slot>
|
||||
<slot>onOrientationRadioToggled()</slot>
|
||||
<slot>onSearchEntryTextChanged()</slot>
|
||||
<slot>onCancelButtonClicked()</slot>
|
||||
<slot>onSelectButtonClicked()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user