Added VAbstractMainWindow class.

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-07-25 19:23:00 +03:00
parent e080d845f3
commit d248c4f18a
5 changed files with 113 additions and 29 deletions

View File

@ -57,7 +57,7 @@
//---------------------------------------------------------------------------------------------------------------------
MainWindowsNoGUI::MainWindowsNoGUI(QWidget *parent)
: QMainWindow(parent), listDetails(QVector<VLayoutDetail>()), currentScene(nullptr), tempSceneLayout(nullptr),
: VAbstractMainWindow(parent), listDetails(QVector<VLayoutDetail>()), currentScene(nullptr), tempSceneLayout(nullptr),
pattern(new VContainer(qApp->TrVars(), qApp->patternUnitP())), doc(nullptr), papers(QList<QGraphicsItem *>()),
shadows(QList<QGraphicsItem *>()), scenes(QList<QGraphicsScene *>()), details(QList<QList<QGraphicsItem *> >()),
undoAction(nullptr), redoAction(nullptr), actionDockWidgetToolOptions(nullptr), actionDockWidgetGroups(nullptr),

View File

@ -37,13 +37,14 @@
#include "xml/vpattern.h"
#include "dialogs/dialogsavelayout.h"
#include "../vlayout/vlayoutgenerator.h"
#include "../vwidgets/vabstractmainwindow.h"
class QGraphicsScene;
class QPrinter;
class PosterData;
class MainWindowsNoGUI : public QMainWindow
class MainWindowsNoGUI : public VAbstractMainWindow
{
Q_OBJECT
public:

View File

@ -0,0 +1,36 @@
/************************************************************************
**
** @file
** @author Valentina Zhuravska <zhuravska19(at)gmail.com>
** @date 19 7, 2016
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2016 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina 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.
**
** Valentina 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 Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#include "vabstractmainwindow.h"
VAbstractMainWindow::VAbstractMainWindow(QWidget *parent) : QMainWindow(parent)
{}
//---------------------------------------------------------------------------------------------------------------------
VAbstractMainWindow::~VAbstractMainWindow()
{}

View File

@ -0,0 +1,45 @@
/************************************************************************
**
** @file
** @author Valentina Zhuravska <zhuravska19(at)gmail.com>
** @date 19 7, 2016
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2016 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina 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.
**
** Valentina 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 Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#ifndef VABSTRACTMAINWINDOW_H
#define VABSTRACTMAINWINDOW_H
#include <QMainWindow>
class VAbstractMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit VAbstractMainWindow(QWidget *parent = nullptr);
virtual ~VAbstractMainWindow() Q_DECL_OVERRIDE;
public slots:
virtual void ShowToolTip(const QString &toolTip)=0;
};
#endif // VABSTRACTMAINWINDOW_H

View File

@ -1,27 +1,29 @@
# ADD TO EACH PATH $$PWD VARIABLE!!!!!!
# This need for corect working file translations.pro
SOURCES += \
$$PWD/vmaingraphicsscene.cpp \
$$PWD/vmaingraphicsview.cpp \
$$PWD/vwidgetpopup.cpp \
$$PWD/vcontrolpointspline.cpp \
$$PWD/vgraphicssimpletextitem.cpp \
$$PWD/vsimplepoint.cpp \
$$PWD/vabstractsimple.cpp \
$$PWD/vnobrushscalepathitem.cpp \
$$PWD/vsimplecurve.cpp
win32-msvc*:SOURCES += $$PWD/stable.cpp
HEADERS += \
$$PWD/stable.h \
$$PWD/vmaingraphicsscene.h \
$$PWD/vmaingraphicsview.h \
$$PWD/vwidgetpopup.h \
$$PWD/vcontrolpointspline.h \
$$PWD/vgraphicssimpletextitem.h \
$$PWD/vsimplepoint.h \
$$PWD/vabstractsimple.h \
$$PWD/vnobrushscalepathitem.h \
$$PWD/vsimplecurve.h
# ADD TO EACH PATH $$PWD VARIABLE!!!!!!
# This need for corect working file translations.pro
SOURCES += \
$$PWD/vmaingraphicsscene.cpp \
$$PWD/vmaingraphicsview.cpp \
$$PWD/vwidgetpopup.cpp \
$$PWD/vcontrolpointspline.cpp \
$$PWD/vgraphicssimpletextitem.cpp \
$$PWD/vsimplepoint.cpp \
$$PWD/vabstractsimple.cpp \
$$PWD/vnobrushscalepathitem.cpp \
$$PWD/vsimplecurve.cpp \
$$PWD/vabstractmainwindow.cpp
win32-msvc*:SOURCES += $$PWD/stable.cpp
HEADERS += \
$$PWD/stable.h \
$$PWD/vmaingraphicsscene.h \
$$PWD/vmaingraphicsview.h \
$$PWD/vwidgetpopup.h \
$$PWD/vcontrolpointspline.h \
$$PWD/vgraphicssimpletextitem.h \
$$PWD/vsimplepoint.h \
$$PWD/vabstractsimple.h \
$$PWD/vnobrushscalepathitem.h \
$$PWD/vsimplecurve.h \
$$PWD/vabstractmainwindow.h