Some reconciling of widget naming conventions.
This commit is contained in:
@@ -25,6 +25,7 @@ set (glabels_sources
|
||||
FileUtil.cpp
|
||||
Handles.cpp
|
||||
Help.cpp
|
||||
LabelEditor.cpp
|
||||
LabelModel.cpp
|
||||
LabelModelObject.cpp
|
||||
LabelModelBoxObject.cpp
|
||||
@@ -33,7 +34,7 @@ set (glabels_sources
|
||||
MainWindow.cpp
|
||||
Merge.cpp
|
||||
MergeField.cpp
|
||||
MergePropertyEditor.cpp
|
||||
MergeView.cpp
|
||||
MergeRecord.cpp
|
||||
ObjectEditor.cpp
|
||||
Outline.cpp
|
||||
@@ -50,7 +51,6 @@ set (glabels_sources
|
||||
TemplatePicker.cpp
|
||||
TemplatePickerItem.cpp
|
||||
TextNode.cpp
|
||||
View.cpp
|
||||
XmlLabelCreator.cpp
|
||||
XmlLabelParser.cpp
|
||||
)
|
||||
@@ -69,13 +69,14 @@ set (glabels_qobject_headers
|
||||
FieldMenu.h
|
||||
FieldMenuItem.h
|
||||
File.h
|
||||
LabelEditor.h
|
||||
LabelModel.h
|
||||
LabelModelObject.h
|
||||
LabelModelBoxObject.h
|
||||
LabelModelShapeObject.h
|
||||
MainWindow.h
|
||||
Merge.h
|
||||
MergePropertyEditor.h
|
||||
MergeView.h
|
||||
ObjectEditor.h
|
||||
PreferencesDialog.h
|
||||
PrintView.h
|
||||
@@ -86,12 +87,11 @@ set (glabels_qobject_headers
|
||||
SimplePreview.h
|
||||
StartupWizard.h
|
||||
TemplatePicker.h
|
||||
View.h
|
||||
)
|
||||
|
||||
set (glabels_forms
|
||||
ui/AboutDialog.ui
|
||||
ui/MergePropertyEditor.ui
|
||||
ui/MergeView.ui
|
||||
ui/ObjectEditor.ui
|
||||
ui/PreferencesDialog.ui
|
||||
ui/PrintView.ui
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* View.cpp
|
||||
/* LabelEditor.cpp
|
||||
*
|
||||
* Copyright (C) 2013-2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "View.h"
|
||||
#include "LabelEditor.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
@@ -75,7 +75,7 @@ namespace
|
||||
///
|
||||
/// Constructor
|
||||
///
|
||||
View::View( QScrollArea* scrollArea, QWidget* parent )
|
||||
LabelEditor::LabelEditor( QScrollArea* scrollArea, QWidget* parent )
|
||||
: QWidget(parent), mScrollArea(scrollArea)
|
||||
{
|
||||
mState = IdleState;
|
||||
@@ -97,7 +97,7 @@ View::View( QScrollArea* scrollArea, QWidget* parent )
|
||||
/// Zoom property
|
||||
///
|
||||
double
|
||||
View::zoom() const
|
||||
LabelEditor::zoom() const
|
||||
{
|
||||
return mZoom;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ View::zoom() const
|
||||
/// Markup visible? property
|
||||
///
|
||||
bool
|
||||
View::markupVisible() const
|
||||
LabelEditor::markupVisible() const
|
||||
{
|
||||
return mMarkupVisible;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ View::markupVisible() const
|
||||
/// Grid visible? property
|
||||
///
|
||||
bool
|
||||
View::qridVisible() const
|
||||
LabelEditor::qridVisible() const
|
||||
{
|
||||
return mGridVisible;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ View::qridVisible() const
|
||||
/// Model Parameter Setter
|
||||
///
|
||||
void
|
||||
View::setModel( LabelModel* model )
|
||||
LabelEditor::setModel( LabelModel* model )
|
||||
{
|
||||
mModel = model;
|
||||
|
||||
@@ -148,7 +148,7 @@ View::setModel( LabelModel* model )
|
||||
/// Grid Visibility Parameter Setter
|
||||
///
|
||||
void
|
||||
View::setGridVisible( bool visibleFlag )
|
||||
LabelEditor::setGridVisible( bool visibleFlag )
|
||||
{
|
||||
mGridVisible = visibleFlag;
|
||||
update();
|
||||
@@ -159,7 +159,7 @@ View::setGridVisible( bool visibleFlag )
|
||||
/// Markup Visibility Parameter Setter
|
||||
///
|
||||
void
|
||||
View::setMarkupVisible( bool visibleFlag )
|
||||
LabelEditor::setMarkupVisible( bool visibleFlag )
|
||||
{
|
||||
mMarkupVisible = visibleFlag;
|
||||
update();
|
||||
@@ -170,7 +170,7 @@ View::setMarkupVisible( bool visibleFlag )
|
||||
/// Zoom In "One Notch"
|
||||
///
|
||||
void
|
||||
View::zoomIn()
|
||||
LabelEditor::zoomIn()
|
||||
{
|
||||
// Find closest standard zoom level to our current zoom
|
||||
// Start with 2nd largest scale
|
||||
@@ -196,7 +196,7 @@ View::zoomIn()
|
||||
/// Zoom Out "One Notch"
|
||||
///
|
||||
void
|
||||
View::zoomOut()
|
||||
LabelEditor::zoomOut()
|
||||
{
|
||||
// Find closest standard zoom level to our current zoom
|
||||
// Start with largest scale, end on 2nd smallest
|
||||
@@ -222,7 +222,7 @@ View::zoomOut()
|
||||
/// Zoom To 1:1 Scale
|
||||
///
|
||||
void
|
||||
View::zoom1To1()
|
||||
LabelEditor::zoom1To1()
|
||||
{
|
||||
setZoomReal( 1.0, false );
|
||||
}
|
||||
@@ -232,7 +232,7 @@ View::zoom1To1()
|
||||
/// Zoom To Fit
|
||||
///
|
||||
void
|
||||
View::zoomToFit()
|
||||
LabelEditor::zoomToFit()
|
||||
{
|
||||
using std::min;
|
||||
using std::max;
|
||||
@@ -256,7 +256,7 @@ View::zoomToFit()
|
||||
/// Is Zoom at Maximum?
|
||||
///
|
||||
bool
|
||||
View::isZoomMax() const
|
||||
LabelEditor::isZoomMax() const
|
||||
{
|
||||
return ( mZoom >= zoomLevels[0] );
|
||||
}
|
||||
@@ -266,7 +266,7 @@ View::isZoomMax() const
|
||||
/// Is Zoom at Minimum?
|
||||
///
|
||||
bool
|
||||
View::isZoomMin() const
|
||||
LabelEditor::isZoomMin() const
|
||||
{
|
||||
return ( mZoom <= zoomLevels[nZoomLevels-1] );
|
||||
}
|
||||
@@ -276,7 +276,7 @@ View::isZoomMin() const
|
||||
/// Set Zoom to Value
|
||||
///
|
||||
void
|
||||
View::setZoomReal( double zoom, bool zoomToFitFlag )
|
||||
LabelEditor::setZoomReal( double zoom, bool zoomToFitFlag )
|
||||
{
|
||||
mZoom = zoom;
|
||||
mZoomToFitFlag = zoomToFitFlag;
|
||||
@@ -301,7 +301,7 @@ View::setZoomReal( double zoom, bool zoomToFitFlag )
|
||||
/// Arrow mode (normal mode)
|
||||
///
|
||||
void
|
||||
View::arrowMode()
|
||||
LabelEditor::arrowMode()
|
||||
{
|
||||
setCursor( Qt::ArrowCursor );
|
||||
|
||||
@@ -313,7 +313,7 @@ View::arrowMode()
|
||||
/// Create box mode
|
||||
///
|
||||
void
|
||||
View::createBoxMode()
|
||||
LabelEditor::createBoxMode()
|
||||
{
|
||||
setCursor( Cursors::Box() );
|
||||
|
||||
@@ -326,7 +326,7 @@ View::createBoxMode()
|
||||
/// Resize Event Handler
|
||||
///
|
||||
void
|
||||
View::resizeEvent( QResizeEvent *event )
|
||||
LabelEditor::resizeEvent( QResizeEvent *event )
|
||||
{
|
||||
if ( mModel )
|
||||
{
|
||||
@@ -350,7 +350,7 @@ View::resizeEvent( QResizeEvent *event )
|
||||
/// Mouse Button Press Event Handler
|
||||
///
|
||||
void
|
||||
View::mousePressEvent( QMouseEvent* event )
|
||||
LabelEditor::mousePressEvent( QMouseEvent* event )
|
||||
{
|
||||
if ( mModel )
|
||||
{
|
||||
@@ -470,7 +470,7 @@ View::mousePressEvent( QMouseEvent* event )
|
||||
// mCreateObject = new LabelModelBarcodeObject();
|
||||
break;
|
||||
default:
|
||||
qDebug() << "View::mousePressEvent: Invalid creation type. Should not happen!";
|
||||
qDebug() << "LabelEditor::mousePressEvent: Invalid creation type. Should not happen!";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ View::mousePressEvent( QMouseEvent* event )
|
||||
|
||||
default:
|
||||
{
|
||||
qDebug() << "View::mousePressEvent: Invalid state. Should not happen!";
|
||||
qDebug() << "LabelEditor::mousePressEvent: Invalid state. Should not happen!";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -516,7 +516,7 @@ View::mousePressEvent( QMouseEvent* event )
|
||||
/// Mouse Movement Event Handler
|
||||
///
|
||||
void
|
||||
View::mouseMoveEvent( QMouseEvent* event )
|
||||
LabelEditor::mouseMoveEvent( QMouseEvent* event )
|
||||
{
|
||||
using std::min;
|
||||
using std::max;
|
||||
@@ -602,13 +602,13 @@ View::mouseMoveEvent( QMouseEvent* event )
|
||||
mCreateObject->setSize( xWorld - mCreateX0, yWorld - mCreateY0 );
|
||||
break;
|
||||
default:
|
||||
qDebug() << "View::mouseMoveEvent: Invalid creation mode. Should not happen!";
|
||||
qDebug() << "LabelEditor::mouseMoveEvent: Invalid creation mode. Should not happen!";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
qDebug() << "View::mouseMoveEvent: Invalid state. Should not happen!";
|
||||
qDebug() << "LabelEditor::mouseMoveEvent: Invalid state. Should not happen!";
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -620,7 +620,7 @@ View::mouseMoveEvent( QMouseEvent* event )
|
||||
/// Mouse Button Release Event Handler
|
||||
///
|
||||
void
|
||||
View::mouseReleaseEvent( QMouseEvent* event )
|
||||
LabelEditor::mouseReleaseEvent( QMouseEvent* event )
|
||||
{
|
||||
if ( mModel )
|
||||
{
|
||||
@@ -696,7 +696,7 @@ View::mouseReleaseEvent( QMouseEvent* event )
|
||||
/// Leave Event Handler
|
||||
///
|
||||
void
|
||||
View::leaveEvent( QEvent* event )
|
||||
LabelEditor::leaveEvent( QEvent* event )
|
||||
{
|
||||
if ( mModel )
|
||||
{
|
||||
@@ -709,7 +709,7 @@ View::leaveEvent( QEvent* event )
|
||||
/// Handle resize motion
|
||||
///
|
||||
void
|
||||
View::handleResizeMotion( const glabels::Distance& xWorld,
|
||||
LabelEditor::handleResizeMotion( const glabels::Distance& xWorld,
|
||||
const glabels::Distance& yWorld )
|
||||
{
|
||||
QPointF p( xWorld.pt(), yWorld.pt() );
|
||||
@@ -786,7 +786,7 @@ View::handleResizeMotion( const glabels::Distance& xWorld,
|
||||
y0 = y0 + y1;
|
||||
break;
|
||||
default:
|
||||
qDebug() << "View::handleResizeMotion: Invalid Handle Location. Should not happen!";
|
||||
qDebug() << "LabelEditor::handleResizeMotion: Invalid Handle Location. Should not happen!";
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -859,7 +859,7 @@ View::handleResizeMotion( const glabels::Distance& xWorld,
|
||||
///
|
||||
/// Key Press Event Handler
|
||||
void
|
||||
View::keyPressEvent( QKeyEvent* event )
|
||||
LabelEditor::keyPressEvent( QKeyEvent* event )
|
||||
{
|
||||
if ( mState == IdleState )
|
||||
{
|
||||
@@ -904,7 +904,7 @@ View::keyPressEvent( QKeyEvent* event )
|
||||
/// Paint Event Handler
|
||||
///
|
||||
void
|
||||
View::paintEvent( QPaintEvent* event )
|
||||
LabelEditor::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
if ( mModel )
|
||||
{
|
||||
@@ -939,7 +939,7 @@ View::paintEvent( QPaintEvent* event )
|
||||
/// Draw Background Layer
|
||||
///
|
||||
void
|
||||
View::drawBgLayer( QPainter* painter )
|
||||
LabelEditor::drawBgLayer( QPainter* painter )
|
||||
{
|
||||
/*
|
||||
* Draw shadow
|
||||
@@ -984,7 +984,7 @@ View::drawBgLayer( QPainter* painter )
|
||||
/// Draw Grid Layer
|
||||
///
|
||||
void
|
||||
View::drawGridLayer( QPainter* painter )
|
||||
LabelEditor::drawGridLayer( QPainter* painter )
|
||||
{
|
||||
if ( mGridVisible )
|
||||
{
|
||||
@@ -1036,7 +1036,7 @@ View::drawGridLayer( QPainter* painter )
|
||||
/// Draw Markup Layer
|
||||
///
|
||||
void
|
||||
View::drawMarkupLayer( QPainter* painter )
|
||||
LabelEditor::drawMarkupLayer( QPainter* painter )
|
||||
{
|
||||
if ( mMarkupVisible )
|
||||
{
|
||||
@@ -1065,7 +1065,7 @@ View::drawMarkupLayer( QPainter* painter )
|
||||
/// Draw Objects Layer
|
||||
///
|
||||
void
|
||||
View::drawObjectsLayer( QPainter* painter )
|
||||
LabelEditor::drawObjectsLayer( QPainter* painter )
|
||||
{
|
||||
mModel->draw( painter );
|
||||
}
|
||||
@@ -1075,7 +1075,7 @@ View::drawObjectsLayer( QPainter* painter )
|
||||
/// Draw Foreground Layer
|
||||
///
|
||||
void
|
||||
View::drawFgLayer( QPainter* painter )
|
||||
LabelEditor::drawFgLayer( QPainter* painter )
|
||||
{
|
||||
/*
|
||||
* Draw label outline
|
||||
@@ -1102,7 +1102,7 @@ View::drawFgLayer( QPainter* painter )
|
||||
/// Draw Highlight Layer
|
||||
///
|
||||
void
|
||||
View::drawHighlightLayer( QPainter* painter )
|
||||
LabelEditor::drawHighlightLayer( QPainter* painter )
|
||||
{
|
||||
painter->save();
|
||||
|
||||
@@ -1122,7 +1122,7 @@ View::drawHighlightLayer( QPainter* painter )
|
||||
/// Draw Select Region Layer
|
||||
///
|
||||
void
|
||||
View::drawSelectRegionLayer( QPainter* painter )
|
||||
LabelEditor::drawSelectRegionLayer( QPainter* painter )
|
||||
{
|
||||
if ( mSelectRegionVisible )
|
||||
{
|
||||
@@ -1144,7 +1144,7 @@ View::drawSelectRegionLayer( QPainter* painter )
|
||||
///
|
||||
/// Settings changed handler
|
||||
///
|
||||
void View::onSettingsChanged()
|
||||
void LabelEditor::onSettingsChanged()
|
||||
{
|
||||
glabels::Units units = Settings::units();
|
||||
|
||||
@@ -1155,7 +1155,7 @@ void View::onSettingsChanged()
|
||||
///
|
||||
/// Model size changed handler
|
||||
///
|
||||
void View::onModelSizeChanged()
|
||||
void LabelEditor::onModelSizeChanged()
|
||||
{
|
||||
using std::min;
|
||||
using std::max;
|
||||
@@ -1,4 +1,4 @@
|
||||
/* View.h
|
||||
/* LabelEditor.h
|
||||
*
|
||||
* Copyright (C) 2013-2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
@@ -18,8 +18,8 @@
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef View_h
|
||||
#define View_h
|
||||
#ifndef LabelEditor_h
|
||||
#define LabelEditor_h
|
||||
|
||||
#include <QWidget>
|
||||
#include <QScrollArea>
|
||||
@@ -35,9 +35,9 @@ class Handle;
|
||||
|
||||
|
||||
///
|
||||
/// View Widget
|
||||
/// LabelEditor Widget
|
||||
///
|
||||
class View : public QWidget
|
||||
class LabelEditor : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -45,7 +45,7 @@ class View : public QWidget
|
||||
// Lifecycle
|
||||
/////////////////////////////////////
|
||||
public:
|
||||
View( QScrollArea* scrollArea, QWidget* parent = 0 );
|
||||
LabelEditor( QScrollArea* scrollArea, QWidget* parent = 0 );
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
@@ -210,4 +210,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // View_h
|
||||
#endif // LabelEditor_h
|
||||
+28
-28
@@ -35,9 +35,9 @@
|
||||
#include "libglabels/Db.h"
|
||||
#include "PreferencesDialog.h"
|
||||
#include "PropertiesView.h"
|
||||
#include "View.h"
|
||||
#include "LabelEditor.h"
|
||||
#include "ObjectEditor.h"
|
||||
#include "MergePropertyEditor.h"
|
||||
#include "MergeView.h"
|
||||
#include "PrintView.h"
|
||||
#include "LabelModel.h"
|
||||
#include "LabelModelBoxObject.h"
|
||||
@@ -82,11 +82,11 @@ MainWindow::MainWindow()
|
||||
setPasteVerbsEnabled( false );
|
||||
setTitle();
|
||||
|
||||
connect( mView, SIGNAL(zoomChanged()), this, SLOT(onZoomChanged()) );
|
||||
connect( mLabelEditor, SIGNAL(zoomChanged()), this, SLOT(onZoomChanged()) );
|
||||
#if 0
|
||||
connect( mView, SIGNAL(pointerMoved(double, double)),
|
||||
connect( mLabelEditor, SIGNAL(pointerMoved(double, double)),
|
||||
this, SLOT(onPointerMoved(double, double)) );
|
||||
connect( mView, SIGNAL(pointerExited()), this, SLOT(onPointerExit()) );
|
||||
connect( mLabelEditor, SIGNAL(pointerExited()), this, SLOT(onPointerExit()) );
|
||||
#endif
|
||||
|
||||
readSettings();
|
||||
@@ -120,7 +120,7 @@ void MainWindow::setModel( LabelModel *label )
|
||||
{
|
||||
mModel = label;
|
||||
mPropertiesView->setModel( mModel );
|
||||
mView->setModel( mModel );
|
||||
mLabelEditor->setModel( mModel );
|
||||
mObjectEditor->setModel( mModel );
|
||||
mPrintView->setModel( mModel );
|
||||
|
||||
@@ -130,7 +130,7 @@ void MainWindow::setModel( LabelModel *label )
|
||||
setMultiSelectionVerbsEnabled( false );
|
||||
setTitle();
|
||||
|
||||
connect( mView, SIGNAL(contextMenuActivate()), this, SLOT(onContextMenuActivate()) );
|
||||
connect( mLabelEditor, SIGNAL(contextMenuActivate()), this, SLOT(onContextMenuActivate()) );
|
||||
connect( mModel, SIGNAL(nameChanged()), this, SLOT(onNameChanged()) );
|
||||
connect( mModel, SIGNAL(modifiedChanged()), this, SLOT(onModifiedChanged()) );
|
||||
connect( mModel, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()) );
|
||||
@@ -627,18 +627,18 @@ QWidget* MainWindow::createEditorPage()
|
||||
{
|
||||
QWidget* page = new QWidget;
|
||||
|
||||
mViewScrollArea = new QScrollArea();
|
||||
mViewScrollArea->setMinimumSize( 640, 450 );
|
||||
mViewScrollArea->setWidgetResizable( true );
|
||||
mLabelEditorScrollArea = new QScrollArea();
|
||||
mLabelEditorScrollArea->setMinimumSize( 640, 450 );
|
||||
mLabelEditorScrollArea->setWidgetResizable( true );
|
||||
|
||||
mView = new View( mViewScrollArea );
|
||||
mLabelEditor = new LabelEditor( mLabelEditorScrollArea );
|
||||
mObjectEditor = new ObjectEditor();
|
||||
|
||||
mViewScrollArea->setWidget( mView );
|
||||
mLabelEditorScrollArea->setWidget( mLabelEditor );
|
||||
|
||||
QVBoxLayout* editorVLayout = new QVBoxLayout;
|
||||
editorVLayout->addWidget( editorToolBar );
|
||||
editorVLayout->addWidget( mViewScrollArea );
|
||||
editorVLayout->addWidget( mLabelEditorScrollArea );
|
||||
|
||||
QHBoxLayout* editorHLayout = new QHBoxLayout;
|
||||
editorHLayout->addLayout( editorVLayout );
|
||||
@@ -655,9 +655,9 @@ QWidget* MainWindow::createEditorPage()
|
||||
///
|
||||
QWidget* MainWindow::createMergePage()
|
||||
{
|
||||
mMergePropertyEditor = new MergePropertyEditor();
|
||||
mMergeView = new MergeView();
|
||||
|
||||
return mMergePropertyEditor;
|
||||
return mMergeView;
|
||||
}
|
||||
|
||||
|
||||
@@ -823,8 +823,8 @@ void MainWindow::readSettings()
|
||||
|
||||
fileToolBar ->setVisible( showFileToolBar );
|
||||
editorToolBar ->setVisible( showEditorToolBar );
|
||||
mView ->setGridVisible( showGrid );
|
||||
mView ->setMarkupVisible( showMarkup );
|
||||
mLabelEditor ->setGridVisible( showGrid );
|
||||
mLabelEditor ->setMarkupVisible( showMarkup );
|
||||
}
|
||||
|
||||
|
||||
@@ -1012,7 +1012,7 @@ void MainWindow::viewEditorToolBar( bool state )
|
||||
///
|
||||
void MainWindow::viewGrid( bool state )
|
||||
{
|
||||
mView->setGridVisible( state );
|
||||
mLabelEditor->setGridVisible( state );
|
||||
}
|
||||
|
||||
|
||||
@@ -1021,7 +1021,7 @@ void MainWindow::viewGrid( bool state )
|
||||
///
|
||||
void MainWindow::viewMarkup( bool state )
|
||||
{
|
||||
mView->setMarkupVisible( state );
|
||||
mLabelEditor->setMarkupVisible( state );
|
||||
}
|
||||
|
||||
|
||||
@@ -1030,7 +1030,7 @@ void MainWindow::viewMarkup( bool state )
|
||||
///
|
||||
void MainWindow::viewZoomIn()
|
||||
{
|
||||
mView->zoomIn();
|
||||
mLabelEditor->zoomIn();
|
||||
}
|
||||
|
||||
|
||||
@@ -1039,7 +1039,7 @@ void MainWindow::viewZoomIn()
|
||||
///
|
||||
void MainWindow::viewZoomOut()
|
||||
{
|
||||
mView->zoomOut();
|
||||
mLabelEditor->zoomOut();
|
||||
}
|
||||
|
||||
|
||||
@@ -1048,7 +1048,7 @@ void MainWindow::viewZoomOut()
|
||||
///
|
||||
void MainWindow::viewZoom1To1()
|
||||
{
|
||||
mView->zoom1To1();
|
||||
mLabelEditor->zoom1To1();
|
||||
}
|
||||
|
||||
|
||||
@@ -1057,7 +1057,7 @@ void MainWindow::viewZoom1To1()
|
||||
///
|
||||
void MainWindow::viewZoomToFit()
|
||||
{
|
||||
mView->zoomToFit();
|
||||
mLabelEditor->zoomToFit();
|
||||
}
|
||||
|
||||
|
||||
@@ -1066,7 +1066,7 @@ void MainWindow::viewZoomToFit()
|
||||
///
|
||||
void MainWindow::objectsArrowMode()
|
||||
{
|
||||
mView->arrowMode();
|
||||
mLabelEditor->arrowMode();
|
||||
}
|
||||
|
||||
|
||||
@@ -1084,7 +1084,7 @@ void MainWindow::objectsCreateText()
|
||||
///
|
||||
void MainWindow::objectsCreateBox()
|
||||
{
|
||||
mView->createBoxMode();
|
||||
mLabelEditor->createBoxMode();
|
||||
}
|
||||
|
||||
|
||||
@@ -1289,10 +1289,10 @@ void MainWindow::onContextMenuActivate()
|
||||
///
|
||||
void MainWindow::onZoomChanged()
|
||||
{
|
||||
zoomInfoLabel->setText( QString( " %1% " ).arg(100*mView->zoom(), 0, 'f', 0) );
|
||||
zoomInfoLabel->setText( QString( " %1% " ).arg(100*mLabelEditor->zoom(), 0, 'f', 0) );
|
||||
|
||||
viewZoomInAction->setEnabled( !mView->isZoomMax() );
|
||||
viewZoomOutAction->setEnabled( !mView->isZoomMin() );
|
||||
viewZoomInAction->setEnabled( !mLabelEditor->isZoomMax() );
|
||||
viewZoomOutAction->setEnabled( !mLabelEditor->isZoomMin() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ class QScrollArea;
|
||||
// Forward References
|
||||
class LabelModel;
|
||||
class PropertiesView;
|
||||
class View;
|
||||
class LabelEditor;
|
||||
class ObjectEditor;
|
||||
class MergePropertyEditor;
|
||||
class MergeView;
|
||||
class PrintView;
|
||||
|
||||
|
||||
@@ -200,10 +200,10 @@ private:
|
||||
QTabWidget* mNotebook;
|
||||
LabelModel* mModel;
|
||||
PropertiesView* mPropertiesView;
|
||||
QScrollArea* mViewScrollArea;
|
||||
View* mView;
|
||||
QScrollArea* mLabelEditorScrollArea;
|
||||
LabelEditor* mLabelEditor;
|
||||
ObjectEditor* mObjectEditor;
|
||||
MergePropertyEditor* mMergePropertyEditor;
|
||||
MergeView* mMergeView;
|
||||
PrintView* mPrintView;
|
||||
|
||||
QLabel* zoomInfoLabel;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* MergePropertyEditor.cpp
|
||||
/* MergeView.cpp
|
||||
*
|
||||
* Copyright (C) 2013 Jim Evins <evins@snaught.com>
|
||||
* Copyright (C) 2016 Jim Evins <evins@snaught.com>
|
||||
*
|
||||
* This file is part of gLabels-qt.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "MergePropertyEditor.h"
|
||||
#include "MergeView.h"
|
||||
|
||||
#include "LabelModel.h"
|
||||
#include <QtDebug>
|
||||
@@ -27,7 +27,7 @@
|
||||
///
|
||||
/// Constructor
|
||||
///
|
||||
MergePropertyEditor::MergePropertyEditor( QWidget *parent )
|
||||
MergeView::MergeView( QWidget *parent )
|
||||
: QWidget(parent), mModel(0)
|
||||
{
|
||||
setupUi( this );
|
||||
@@ -37,7 +37,7 @@ MergePropertyEditor::MergePropertyEditor( QWidget *parent )
|
||||
///
|
||||
/// Destructor
|
||||
///
|
||||
MergePropertyEditor::~MergePropertyEditor()
|
||||
MergeView::~MergeView()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ MergePropertyEditor::~MergePropertyEditor()
|
||||
///
|
||||
/// Set Model
|
||||
///
|
||||
void MergePropertyEditor::setModel( LabelModel* model )
|
||||
void MergeView::setModel( LabelModel* model )
|
||||
{
|
||||
mModel = model;
|
||||
|
||||
@@ -56,6 +56,6 @@ void MergePropertyEditor::setModel( LabelModel* model )
|
||||
///
|
||||
/// Label changed handler
|
||||
///
|
||||
void MergePropertyEditor::onLabelChanged()
|
||||
void MergeView::onLabelChanged()
|
||||
{
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/* MergePropertyEditor.h
|
||||
/* MergeView.h
|
||||
*
|
||||
* Copyright (C) 2013 Jim Evins <evins@snaught.com>
|
||||
* Copyright (C) 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 MergePropertyEditor_h
|
||||
#define MergePropertyEditor_h
|
||||
#ifndef MergeView_h
|
||||
#define MergeView_h
|
||||
|
||||
#include "ui_MergePropertyEditor.h"
|
||||
#include "ui_MergeView.h"
|
||||
|
||||
|
||||
class LabelModel; // Forward reference
|
||||
@@ -30,7 +30,7 @@ class LabelModel; // Forward reference
|
||||
///
|
||||
/// Merge Property Editor Widget
|
||||
///
|
||||
class MergePropertyEditor : public QWidget, public Ui_MergePropertyEditor
|
||||
class MergeView : public QWidget, public Ui_MergeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -39,8 +39,8 @@ class MergePropertyEditor : public QWidget, public Ui_MergePropertyEditor
|
||||
// Life Cycle
|
||||
/////////////////////////////////
|
||||
public:
|
||||
MergePropertyEditor( QWidget *parent = 0 );
|
||||
~MergePropertyEditor();
|
||||
MergeView( QWidget *parent = 0 );
|
||||
~MergeView();
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
@@ -65,4 +65,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // MergePropertyEditor_h
|
||||
#endif // MergeView_h
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MergePropertyEditor</class>
|
||||
<class>MergeView</class>
|
||||
<widget class="QWidget" name="MergePropertyEditor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
Reference in New Issue
Block a user