mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-31 16:50:52 +01:00
Modernize-use-nullptr refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5008 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -29,7 +29,7 @@ class TitleBlockDimensionWidget : public QDialog {
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
TitleBlockDimensionWidget(bool, QWidget * parent = 0);
|
||||
TitleBlockDimensionWidget(bool, QWidget * parent = nullptr);
|
||||
virtual ~TitleBlockDimensionWidget();
|
||||
private:
|
||||
TitleBlockDimensionWidget(const TitleBlockDimensionWidget &);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
class GridLayoutAnimation : public QVariantAnimation {
|
||||
// Constructors, destructor
|
||||
public:
|
||||
GridLayoutAnimation(QGraphicsGridLayout * = 0, QObject * = 0);
|
||||
GridLayoutAnimation(QGraphicsGridLayout * = nullptr, QObject * = nullptr);
|
||||
virtual ~GridLayoutAnimation();
|
||||
|
||||
// methods
|
||||
|
||||
@@ -30,7 +30,7 @@ class HelperCell : public QGraphicsObject, public QGraphicsLayoutItem {
|
||||
|
||||
// constructor, destructor
|
||||
public:
|
||||
HelperCell(QGraphicsItem * = 0);
|
||||
HelperCell(QGraphicsItem * = nullptr);
|
||||
virtual ~HelperCell();
|
||||
private:
|
||||
HelperCell(const HelperCell &);
|
||||
@@ -48,7 +48,7 @@ class HelperCell : public QGraphicsObject, public QGraphicsLayoutItem {
|
||||
virtual void setGeometry(const QRectF &);
|
||||
virtual QSizeF sizeHint(Qt::SizeHint, const QSizeF & = QSizeF()) const;
|
||||
virtual QRectF boundingRect() const;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual void setType(QET::TitleBlockColumnLength);
|
||||
virtual void setActions(const QList<QAction *> &);
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
IntegrationMoveTitleBlockTemplatesHandler::IntegrationMoveTitleBlockTemplatesHandler(QWidget *parent) :
|
||||
MoveTitleBlockTemplatesHandler(parent),
|
||||
parent_widget_(parent),
|
||||
integ_dialog_(0)
|
||||
integ_dialog_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class IntegrationMoveTitleBlockTemplatesHandler : public MoveTitleBlockTemplates
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
IntegrationMoveTitleBlockTemplatesHandler(QWidget * = 0);
|
||||
IntegrationMoveTitleBlockTemplatesHandler(QWidget * = nullptr);
|
||||
virtual ~IntegrationMoveTitleBlockTemplatesHandler();
|
||||
private:
|
||||
IntegrationMoveTitleBlockTemplatesHandler(const IntegrationMoveTitleBlockTemplatesHandler &);
|
||||
|
||||
@@ -32,7 +32,7 @@ class MoveTitleBlockTemplatesHandler : public QObject {
|
||||
|
||||
// Constructors, destructor
|
||||
public:
|
||||
MoveTitleBlockTemplatesHandler(QObject * = 0) {}
|
||||
MoveTitleBlockTemplatesHandler(QObject * = nullptr) {}
|
||||
virtual ~MoveTitleBlockTemplatesHandler() {}
|
||||
private:
|
||||
MoveTitleBlockTemplatesHandler(const MoveTitleBlockTemplatesHandler &);
|
||||
|
||||
@@ -35,8 +35,8 @@ QETTitleBlockTemplateEditor::QETTitleBlockTemplateEditor(QWidget *parent) :
|
||||
opened_from_file_(false),
|
||||
read_only_(false),
|
||||
duplicate_(false),
|
||||
tb_template_(0),
|
||||
logo_manager_(0)
|
||||
tb_template_(nullptr),
|
||||
logo_manager_(nullptr)
|
||||
{
|
||||
setWindowIcon(QET::Icons::QETLogo);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
@@ -38,7 +38,7 @@ class QETTitleBlockTemplateEditor : public QETMainWindow {
|
||||
|
||||
// constructor, destructor
|
||||
public:
|
||||
QETTitleBlockTemplateEditor(QWidget * = 0);
|
||||
QETTitleBlockTemplateEditor(QWidget * = nullptr);
|
||||
virtual ~QETTitleBlockTemplateEditor();
|
||||
private:
|
||||
QETTitleBlockTemplateEditor(const QETTitleBlockTemplateEditor &);
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
class SplittedHelperCell : public HelperCell {
|
||||
Q_OBJECT
|
||||
public:
|
||||
SplittedHelperCell(QGraphicsItem * = 0);
|
||||
SplittedHelperCell(QGraphicsItem * = nullptr);
|
||||
virtual ~SplittedHelperCell();
|
||||
private:
|
||||
SplittedHelperCell(const SplittedHelperCell &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
|
||||
// attributes
|
||||
QColor split_background_color; ///< Background color on the split side
|
||||
|
||||
@@ -103,7 +103,7 @@ bool TitleBlockTemplateCellsSet::hasExternalSpan() const {
|
||||
@return the top left cell within this set, or 0 if this set is empty
|
||||
*/
|
||||
TitleBlockTemplateVisualCell *TitleBlockTemplateCellsSet::topLeftCell() const {
|
||||
if (empty()) return(0);
|
||||
if (empty()) return(nullptr);
|
||||
if (count() == 1) return(first());
|
||||
|
||||
// look for cells at the top
|
||||
@@ -118,7 +118,7 @@ TitleBlockTemplateVisualCell *TitleBlockTemplateCellsSet::topLeftCell() const {
|
||||
|
||||
// look for the cell at the left
|
||||
int lowest_num_col = 100000;
|
||||
TitleBlockTemplateVisualCell *candidate = 0;
|
||||
TitleBlockTemplateVisualCell *candidate = nullptr;
|
||||
foreach (TitleBlockTemplateVisualCell *cell_view, candidates) {
|
||||
if (TitleBlockCell *cell = cell_view -> cell()) {
|
||||
if (cell -> num_col < lowest_num_col) {
|
||||
@@ -134,7 +134,7 @@ TitleBlockTemplateVisualCell *TitleBlockTemplateCellsSet::topLeftCell() const {
|
||||
@return the bottom right cell within this set, or 0 if this set is empty
|
||||
*/
|
||||
TitleBlockTemplateVisualCell *TitleBlockTemplateCellsSet::bottomRightCell() const {
|
||||
if (empty()) return(0);
|
||||
if (empty()) return(nullptr);
|
||||
if (count() == 1) return(first());
|
||||
|
||||
// look for cells at the bottom
|
||||
@@ -147,7 +147,7 @@ TitleBlockTemplateVisualCell *TitleBlockTemplateCellsSet::bottomRightCell() cons
|
||||
|
||||
// look for the cell at the right
|
||||
qreal highest_right = -100000;
|
||||
TitleBlockTemplateVisualCell *candidate = 0;
|
||||
TitleBlockTemplateVisualCell *candidate = nullptr;
|
||||
foreach (TitleBlockTemplateVisualCell *cell_view, candidates) {
|
||||
qreal right = cell_view -> geometry().right();
|
||||
if (right > highest_right) {
|
||||
|
||||
@@ -33,7 +33,7 @@ class TitleBlockTemplateCellWidget : public QWidget {
|
||||
|
||||
// constructor, destructor
|
||||
public:
|
||||
TitleBlockTemplateCellWidget(TitleBlockTemplate * = 0, QWidget * = 0);
|
||||
TitleBlockTemplateCellWidget(TitleBlockTemplate * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TitleBlockTemplateCellWidget();
|
||||
private:
|
||||
TitleBlockTemplateCellWidget(const TitleBlockTemplateCellWidget &);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
*/
|
||||
ModifyTitleBlockCellCommand::ModifyTitleBlockCellCommand(TitleBlockCell *cell, QUndoCommand *parent) :
|
||||
QUndoCommand(parent),
|
||||
view_(0),
|
||||
view_(nullptr),
|
||||
modified_cell_(cell)
|
||||
{
|
||||
}
|
||||
@@ -159,7 +159,7 @@ void ModifyTitleBlockCellCommand::addModification(const QString &attribute, cons
|
||||
TitleBlockTemplateCommand::TitleBlockTemplateCommand(TitleBlockTemplate *tbtemplate, QUndoCommand *parent) :
|
||||
QUndoCommand(parent),
|
||||
tbtemplate_(tbtemplate),
|
||||
view_(0)
|
||||
view_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ void TitleBlockTemplateCommand::refreshLayout() {
|
||||
@return a ModifyTemplateGridCommand object, or 0 if something went wrong.
|
||||
*/
|
||||
ModifyTemplateGridCommand *ModifyTemplateGridCommand::addRow(TitleBlockTemplate *tbtemplate, int index) {
|
||||
if (!tbtemplate) return(0);
|
||||
if (!tbtemplate) return(nullptr);
|
||||
|
||||
// create the command itself
|
||||
ModifyTemplateGridCommand *add_row_command = new ModifyTemplateGridCommand(tbtemplate);
|
||||
@@ -244,7 +244,7 @@ ModifyTemplateGridCommand *ModifyTemplateGridCommand::addRow(TitleBlockTemplate
|
||||
@return a ModifyTemplateGridCommand object, or 0 if something went wrong.
|
||||
*/
|
||||
ModifyTemplateGridCommand *ModifyTemplateGridCommand::addColumn(TitleBlockTemplate *tbtemplate, int index) {
|
||||
if (!tbtemplate) return(0);
|
||||
if (!tbtemplate) return(nullptr);
|
||||
|
||||
// create the command itself
|
||||
ModifyTemplateGridCommand *add_column_command = new ModifyTemplateGridCommand(tbtemplate);
|
||||
@@ -265,7 +265,7 @@ ModifyTemplateGridCommand *ModifyTemplateGridCommand::addColumn(TitleBlockTempla
|
||||
@return a ModifyTemplateGridCommand object, or 0 if something went wrong.
|
||||
*/
|
||||
ModifyTemplateGridCommand *ModifyTemplateGridCommand::deleteRow(TitleBlockTemplate *tbtemplate, int index) {
|
||||
if (!tbtemplate) return(0);
|
||||
if (!tbtemplate) return(nullptr);
|
||||
|
||||
// create the command itself
|
||||
ModifyTemplateGridCommand *del_row_command = new ModifyTemplateGridCommand(tbtemplate);
|
||||
@@ -284,7 +284,7 @@ ModifyTemplateGridCommand *ModifyTemplateGridCommand::deleteRow(TitleBlockTempla
|
||||
@return a ModifyTemplateGridCommand object, or 0 if something went wrong.
|
||||
*/
|
||||
ModifyTemplateGridCommand *ModifyTemplateGridCommand::deleteColumn(TitleBlockTemplate *tbtemplate, int index) {
|
||||
if (!tbtemplate) return(0);
|
||||
if (!tbtemplate) return(nullptr);
|
||||
|
||||
// create the command itself
|
||||
ModifyTemplateGridCommand *del_column_command = new ModifyTemplateGridCommand(tbtemplate);
|
||||
@@ -588,7 +588,7 @@ void ModifyTemplateDimension::apply(const TitleBlockDimension &dimension) {
|
||||
*/
|
||||
MergeCellsCommand::MergeCellsCommand(const TitleBlockTemplateCellsSet &merged_cells, TitleBlockTemplate *tbtemplate, QUndoCommand *parent) :
|
||||
TitleBlockTemplateCommand(tbtemplate, parent),
|
||||
spanning_cell_(0),
|
||||
spanning_cell_(nullptr),
|
||||
row_span_after_(-1),
|
||||
col_span_after_(-1)
|
||||
{
|
||||
@@ -713,16 +713,16 @@ void MergeCellsCommand::redo() {
|
||||
TitleBlockCell *MergeCellsCommand::getBottomRightCell(const TitleBlockTemplateCellsSet &cells_set) {
|
||||
// first, we get the visual cell at the bottom right
|
||||
TitleBlockTemplateVisualCell *bottom_right_cell = cells_set.bottomRightCell();
|
||||
if (!bottom_right_cell) return(0);
|
||||
if (!bottom_right_cell) return(nullptr);
|
||||
|
||||
// next, we get its logical cells: the painted one and the spanned ones (if any)
|
||||
QSet<TitleBlockCell *> logical_cells = bottom_right_cell -> cells();
|
||||
if (logical_cells.isEmpty()) return(0);
|
||||
if (logical_cells.isEmpty()) return(nullptr);
|
||||
if (logical_cells.count() == 1) return(logical_cells.toList().first());
|
||||
|
||||
// we then look for the bottom right logical cell
|
||||
int max_num_row = -1, max_num_col = -1;
|
||||
TitleBlockCell *candidate = 0;
|
||||
TitleBlockCell *candidate = nullptr;
|
||||
foreach(TitleBlockCell *cell, logical_cells) {
|
||||
if (cell -> num_row > max_num_row) max_num_row = cell -> num_row;
|
||||
if (cell -> num_col > max_num_col) max_num_col = cell -> num_col;
|
||||
@@ -743,7 +743,7 @@ TitleBlockCell *MergeCellsCommand::getBottomRightCell(const TitleBlockTemplateCe
|
||||
*/
|
||||
SplitCellsCommand::SplitCellsCommand(const TitleBlockTemplateCellsSet &splitted_cells, TitleBlockTemplate *tbtemplate, QUndoCommand *parent) :
|
||||
TitleBlockTemplateCommand(tbtemplate, parent),
|
||||
spanning_cell_(0),
|
||||
spanning_cell_(nullptr),
|
||||
row_span_before_(-1),
|
||||
col_span_before_(-1)
|
||||
{
|
||||
@@ -832,7 +832,7 @@ void SplitCellsCommand::redo() {
|
||||
|
||||
// the spanned cells are not spanned anymore
|
||||
foreach(TitleBlockCell *cell, spanned_cells_) {
|
||||
cell -> spanner_cell = 0;
|
||||
cell -> spanner_cell = nullptr;
|
||||
}
|
||||
|
||||
// the spanning cell does not span anymore
|
||||
|
||||
@@ -33,7 +33,7 @@ class TitleBlockTemplate;
|
||||
class ModifyTitleBlockCellCommand : public QUndoCommand {
|
||||
// constructor, destructor
|
||||
public:
|
||||
ModifyTitleBlockCellCommand(TitleBlockCell *, QUndoCommand * = 0);
|
||||
ModifyTitleBlockCellCommand(TitleBlockCell *, QUndoCommand * = nullptr);
|
||||
virtual ~ModifyTitleBlockCellCommand();
|
||||
private:
|
||||
ModifyTitleBlockCellCommand(const ModifyTitleBlockCellCommand &);
|
||||
@@ -66,7 +66,7 @@ class ModifyTitleBlockCellCommand : public QUndoCommand {
|
||||
class TitleBlockTemplateCommand : public QUndoCommand {
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TitleBlockTemplateCommand(TitleBlockTemplate * = 0, QUndoCommand * = 0);
|
||||
TitleBlockTemplateCommand(TitleBlockTemplate * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~TitleBlockTemplateCommand();
|
||||
private:
|
||||
TitleBlockTemplateCommand(const TitleBlockTemplateCommand &);
|
||||
@@ -100,7 +100,7 @@ class ModifyTemplateGridCommand : public TitleBlockTemplateCommand {
|
||||
|
||||
// Constructors, destructor
|
||||
public:
|
||||
ModifyTemplateGridCommand(TitleBlockTemplate * = 0, QUndoCommand * = 0);
|
||||
ModifyTemplateGridCommand(TitleBlockTemplate * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ModifyTemplateGridCommand();
|
||||
private:
|
||||
ModifyTemplateGridCommand(const ModifyTemplateGridCommand &);
|
||||
@@ -140,7 +140,7 @@ class ModifyTemplateGridCommand : public TitleBlockTemplateCommand {
|
||||
class ModifyTemplateDimension : public TitleBlockTemplateCommand {
|
||||
// Constructor, destructor
|
||||
public:
|
||||
ModifyTemplateDimension(TitleBlockTemplate * = 0, QUndoCommand * = 0);
|
||||
ModifyTemplateDimension(TitleBlockTemplate * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ModifyTemplateDimension();
|
||||
private:
|
||||
ModifyTemplateDimension(const ModifyTemplateDimension &);
|
||||
@@ -177,7 +177,7 @@ class ModifyTemplateDimension : public TitleBlockTemplateCommand {
|
||||
class MergeCellsCommand : public TitleBlockTemplateCommand {
|
||||
// Constructor, destructor
|
||||
public:
|
||||
MergeCellsCommand(const TitleBlockTemplateCellsSet &, TitleBlockTemplate * = 0, QUndoCommand * = 0);
|
||||
MergeCellsCommand(const TitleBlockTemplateCellsSet &, TitleBlockTemplate * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~MergeCellsCommand();
|
||||
|
||||
// methods
|
||||
@@ -211,7 +211,7 @@ class MergeCellsCommand : public TitleBlockTemplateCommand {
|
||||
class SplitCellsCommand : public TitleBlockTemplateCommand {
|
||||
// Constructor, destructor
|
||||
public:
|
||||
SplitCellsCommand(const TitleBlockTemplateCellsSet &, TitleBlockTemplate * = 0, QUndoCommand * = 0);
|
||||
SplitCellsCommand(const TitleBlockTemplateCellsSet &, TitleBlockTemplate * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~SplitCellsCommand();
|
||||
|
||||
// methods
|
||||
@@ -239,7 +239,7 @@ class SplitCellsCommand : public TitleBlockTemplateCommand {
|
||||
class ChangeTemplateInformationsCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeTemplateInformationsCommand(TitleBlockTemplate *, const QString &, const QString &, QUndoCommand * = 0);
|
||||
ChangeTemplateInformationsCommand(TitleBlockTemplate *, const QString &, const QString &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeTemplateInformationsCommand();
|
||||
private:
|
||||
ChangeTemplateInformationsCommand(const ChangeTemplateInformationsCommand &);
|
||||
@@ -265,7 +265,7 @@ class ChangeTemplateInformationsCommand : public QUndoCommand {
|
||||
class CutTemplateCellsCommand : public TitleBlockTemplateCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
CutTemplateCellsCommand(TitleBlockTemplate *, QUndoCommand * = 0);
|
||||
CutTemplateCellsCommand(TitleBlockTemplate *, QUndoCommand * = nullptr);
|
||||
virtual ~CutTemplateCellsCommand();
|
||||
private:
|
||||
CutTemplateCellsCommand(const CutTemplateCellsCommand &);
|
||||
@@ -290,7 +290,7 @@ class CutTemplateCellsCommand : public TitleBlockTemplateCommand {
|
||||
class PasteTemplateCellsCommand : public TitleBlockTemplateCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PasteTemplateCellsCommand(TitleBlockTemplate *, QUndoCommand * = 0);
|
||||
PasteTemplateCellsCommand(TitleBlockTemplate *, QUndoCommand * = nullptr);
|
||||
virtual ~PasteTemplateCellsCommand();
|
||||
private:
|
||||
PasteTemplateCellsCommand(const PasteTemplateCellsCommand &);
|
||||
|
||||
@@ -27,7 +27,7 @@ class TitleBlockTemplateDeleter : public QWidget {
|
||||
Q_OBJECT
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TitleBlockTemplateDeleter(const TitleBlockTemplateLocation &, QWidget * = 0);
|
||||
TitleBlockTemplateDeleter(const TitleBlockTemplateLocation &, QWidget * = nullptr);
|
||||
virtual ~TitleBlockTemplateDeleter();
|
||||
private:
|
||||
TitleBlockTemplateDeleter(const TitleBlockTemplateDeleter &);
|
||||
|
||||
@@ -113,7 +113,7 @@ QETProject *TitleBlockTemplateLocation::parentProject() const {
|
||||
if (collection_) {
|
||||
return(collection_ -> parentProject());
|
||||
}
|
||||
return(0);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,7 +141,7 @@ QDomElement TitleBlockTemplateLocation::getTemplateXmlDescription() const {
|
||||
parentCollection() -> getTemplate(...).
|
||||
*/
|
||||
TitleBlockTemplate *TitleBlockTemplateLocation::getTemplate() const {
|
||||
if (!collection_ || name_.isEmpty()) return(0);
|
||||
if (!collection_ || name_.isEmpty()) return(nullptr);
|
||||
return(collection_ -> getTemplate(name_));
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class TitleBlockTemplatesCollection;
|
||||
class TitleBlockTemplateLocation {
|
||||
// constructor, destructor
|
||||
public:
|
||||
TitleBlockTemplateLocation(const QString & = QString(), TitleBlockTemplatesCollection * = 0);
|
||||
TitleBlockTemplateLocation(const QString & = QString(), TitleBlockTemplatesCollection * = nullptr);
|
||||
virtual ~TitleBlockTemplateLocation();
|
||||
|
||||
// static methods
|
||||
|
||||
@@ -29,7 +29,7 @@ class TitleBlockTemplateLocationChooser : public QWidget {
|
||||
Q_OBJECT
|
||||
// Constructor, destructor
|
||||
public:
|
||||
TitleBlockTemplateLocationChooser(const TitleBlockTemplateLocation &, QWidget * = 0);
|
||||
TitleBlockTemplateLocationChooser(const TitleBlockTemplateLocation &, QWidget * = nullptr);
|
||||
~TitleBlockTemplateLocationChooser();
|
||||
private:
|
||||
TitleBlockTemplateLocationChooser(const TitleBlockTemplateLocationChooser &);
|
||||
|
||||
@@ -31,7 +31,7 @@ class TitleBlockTemplateLocationSaver : public TitleBlockTemplateLocationChooser
|
||||
Q_OBJECT
|
||||
// Constructor, destructor
|
||||
public:
|
||||
TitleBlockTemplateLocationSaver(const TitleBlockTemplateLocation &, QWidget * = 0);
|
||||
TitleBlockTemplateLocationSaver(const TitleBlockTemplateLocation &, QWidget * = nullptr);
|
||||
~TitleBlockTemplateLocationSaver();
|
||||
private:
|
||||
TitleBlockTemplateLocationSaver(const TitleBlockTemplateLocationSaver &);
|
||||
|
||||
@@ -160,7 +160,7 @@ void TitleBlockTemplateLogoManager::fillView() {
|
||||
}
|
||||
|
||||
QListWidgetItem *current_item = logos_view_ -> currentItem();
|
||||
updateLogoInformations(current_item, 0);
|
||||
updateLogoInformations(current_item, nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,9 +181,9 @@ QSize TitleBlockTemplateLogoManager::iconsize() const {
|
||||
*/
|
||||
QString TitleBlockTemplateLogoManager::confirmLogoName(const QString &initial_name) {
|
||||
QString name = initial_name;
|
||||
QDialog *rename_dialog = 0;
|
||||
QLabel *rd_label = 0;
|
||||
QLineEdit *rd_input = 0;
|
||||
QDialog *rename_dialog = nullptr;
|
||||
QLabel *rd_label = nullptr;
|
||||
QLineEdit *rd_input = nullptr;
|
||||
while (managed_template_ -> logos().contains(name)) {
|
||||
if (!rename_dialog) {
|
||||
rename_dialog = new QDialog(this);
|
||||
|
||||
@@ -28,7 +28,7 @@ class TitleBlockTemplateLogoManager : public QWidget {
|
||||
Q_OBJECT
|
||||
// Constructor, destructor
|
||||
public:
|
||||
TitleBlockTemplateLogoManager(TitleBlockTemplate *, QWidget * = 0);
|
||||
TitleBlockTemplateLogoManager(TitleBlockTemplate *, QWidget * = nullptr);
|
||||
virtual ~TitleBlockTemplateLogoManager();
|
||||
|
||||
// methods
|
||||
|
||||
@@ -88,7 +88,7 @@ void TitleBlockTemplatesCollection::setCollection(QET::QetCollection c) {
|
||||
collection is not related to any project.
|
||||
*/
|
||||
QETProject *TitleBlockTemplatesCollection::parentProject() {
|
||||
return(0);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,7 +195,7 @@ TitleBlockTemplate *TitleBlockTemplatesProjectCollection::getTemplate(const QStr
|
||||
|
||||
// No? Do we even know of it?
|
||||
if (!titleblock_templates_xml_.contains(template_name)) {
|
||||
return(0);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
// Ok, we have its XML description, we have to generate a TitleBlockTemplate object
|
||||
@@ -204,7 +204,7 @@ TitleBlockTemplate *TitleBlockTemplatesProjectCollection::getTemplate(const QStr
|
||||
titleblock_templates_.insert(template_name, titleblock_template);
|
||||
return(titleblock_template);
|
||||
} else {
|
||||
return(0);
|
||||
return(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ QStringList TitleBlockTemplatesFilesCollection::templates() {
|
||||
could not be loaded.
|
||||
*/
|
||||
TitleBlockTemplate *TitleBlockTemplatesFilesCollection::getTemplate(const QString &template_name) {
|
||||
if (!templates().contains(template_name)) return(0);
|
||||
if (!templates().contains(template_name)) return(nullptr);
|
||||
|
||||
TitleBlockTemplate *tbtemplate = new TitleBlockTemplate();
|
||||
QString tbt_file_path = path(template_name);
|
||||
@@ -409,7 +409,7 @@ TitleBlockTemplate *TitleBlockTemplatesFilesCollection::getTemplate(const QStrin
|
||||
bool loading = tbtemplate -> loadFromXmlFile(tbt_file_path);
|
||||
if (!loading) {
|
||||
delete tbtemplate;
|
||||
return(0);
|
||||
return(nullptr);
|
||||
}
|
||||
return(tbtemplate);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class TitleBlockTemplatesProjectCollection : public TitleBlockTemplatesCollectio
|
||||
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TitleBlockTemplatesProjectCollection(QETProject *, QObject *parent = 0);
|
||||
TitleBlockTemplatesProjectCollection(QETProject *, QObject *parent = nullptr);
|
||||
virtual ~TitleBlockTemplatesProjectCollection();
|
||||
private:
|
||||
TitleBlockTemplatesProjectCollection(const TitleBlockTemplatesProjectCollection &);
|
||||
@@ -126,7 +126,7 @@ class TitleBlockTemplatesFilesCollection : public TitleBlockTemplatesCollection
|
||||
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TitleBlockTemplatesFilesCollection(const QString &, QObject * = 0);
|
||||
TitleBlockTemplatesFilesCollection(const QString &, QObject * = nullptr);
|
||||
virtual ~TitleBlockTemplatesFilesCollection();
|
||||
private:
|
||||
TitleBlockTemplatesFilesCollection(const TitleBlockTemplatesFilesCollection &);
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
*/
|
||||
TitleBlockTemplateView::TitleBlockTemplateView(QWidget *parent) :
|
||||
QGraphicsView(parent),
|
||||
tbtemplate_(0),
|
||||
tbgrid_(0),
|
||||
form_(0),
|
||||
tbtemplate_(nullptr),
|
||||
tbgrid_(nullptr),
|
||||
form_(nullptr),
|
||||
preview_width_(DEFAULT_PREVIEW_WIDTH),
|
||||
apply_columns_widths_count_(0),
|
||||
apply_rows_heights_count_(0),
|
||||
@@ -57,8 +57,8 @@ TitleBlockTemplateView::TitleBlockTemplateView(QWidget *parent) :
|
||||
*/
|
||||
TitleBlockTemplateView::TitleBlockTemplateView(QGraphicsScene *scene, QWidget *parent) :
|
||||
QGraphicsView(scene, parent),
|
||||
tbtemplate_(0),
|
||||
tbgrid_(0),
|
||||
tbtemplate_(nullptr),
|
||||
tbgrid_(nullptr),
|
||||
preview_width_(DEFAULT_PREVIEW_WIDTH),
|
||||
apply_columns_widths_count_(0),
|
||||
apply_rows_heights_count_(0),
|
||||
|
||||
@@ -34,8 +34,8 @@ class TitleBlockTemplateView : public QGraphicsView {
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
TitleBlockTemplateView(QWidget * = 0);
|
||||
TitleBlockTemplateView(QGraphicsScene *, QWidget * = 0);
|
||||
TitleBlockTemplateView(QWidget * = nullptr);
|
||||
TitleBlockTemplateView(QGraphicsScene *, QWidget * = nullptr);
|
||||
virtual ~TitleBlockTemplateView();
|
||||
private:
|
||||
TitleBlockTemplateView(const TitleBlockTemplateView &);
|
||||
@@ -69,8 +69,8 @@ class TitleBlockTemplateView : public QGraphicsView {
|
||||
void addRowBefore();
|
||||
void addColumnAfter();
|
||||
void addRowAfter();
|
||||
void editColumn(HelperCell * = 0);
|
||||
void editRow(HelperCell * = 0);
|
||||
void editColumn(HelperCell * = nullptr);
|
||||
void editRow(HelperCell * = nullptr);
|
||||
void deleteColumn();
|
||||
void deleteRow();
|
||||
void mergeSelectedCells();
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
TitleBlockTemplateVisualCell::TitleBlockTemplateVisualCell(QGraphicsItem *parent) :
|
||||
QGraphicsLayoutItem(),
|
||||
QGraphicsItem(parent),
|
||||
template_(0),
|
||||
cell_(0)
|
||||
template_(nullptr),
|
||||
cell_(nullptr)
|
||||
{
|
||||
setGraphicsItem(this);
|
||||
setFlag(QGraphicsItem::ItemIsSelectable, true);
|
||||
|
||||
@@ -29,7 +29,7 @@ class TitleBlockTemplate;
|
||||
class TitleBlockTemplateVisualCell : public QGraphicsLayoutItem, public QGraphicsItem {
|
||||
// constructor, destructor
|
||||
public:
|
||||
TitleBlockTemplateVisualCell(QGraphicsItem * parent = 0);
|
||||
TitleBlockTemplateVisualCell(QGraphicsItem * parent = nullptr);
|
||||
virtual ~TitleBlockTemplateVisualCell();
|
||||
private:
|
||||
TitleBlockTemplateVisualCell(const TitleBlockTemplateVisualCell &);
|
||||
@@ -39,7 +39,7 @@ class TitleBlockTemplateVisualCell : public QGraphicsLayoutItem, public QGraphic
|
||||
virtual void setGeometry(const QRectF &);
|
||||
virtual QSizeF sizeHint(Qt::SizeHint, const QSizeF & = QSizeF()) const;
|
||||
virtual QRectF boundingRect() const;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
|
||||
public slots:
|
||||
void setTemplateCell(TitleBlockTemplate *, TitleBlockCell *);
|
||||
|
||||
Reference in New Issue
Block a user