copyright and refactor

This commit is contained in:
alemuntoni 2021-09-09 14:40:35 +02:00
parent 643c60ff1a
commit a615bf05f3
5 changed files with 118 additions and 30 deletions

View File

@ -1,3 +1,25 @@
/****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyright(C) 2004-2021 \/)\/ *
* Visual Computing Lab /\/| *
* ISTI - Italian National Research Council | *
* \ *
* All rights reserved. *
* *
* This program 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 2 of the License, or *
* (at your option) any later version. *
* *
* This program 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 (http://www.gnu.org/licenses/gpl.txt) *
* for more details. *
* *
****************************************************************************/
#include "filter_dock_dialog.h"
#include "ui_filter_dock_dialog.h"
@ -68,7 +90,7 @@ FilterDockDialog::~FilterDockDialog()
void FilterDockDialog::on_previewCheckBox_stateChanged(int state)
{
if (state == Qt::Checked) { //enable preview
if (state == Qt::Checked) { // enable preview
ui->parameterFrame->writeValuesOnParameterList(parameters);
// if the preview mesh state is valid and parameters are not changed, we do not need to
@ -85,7 +107,8 @@ void FilterDockDialog::on_previewCheckBox_stateChanged(int state)
currentGLArea->updateAllDecorators();
}
}
else { // not checked - disable preview
// not checked - disable preview
else {
noPreviewMeshState.apply(mesh); // re-apply old state of the mesh
updateRenderingData(mw, mesh);
if (currentGLArea != nullptr)

View File

@ -1,3 +1,25 @@
/****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyright(C) 2004-2021 \/)\/ *
* Visual Computing Lab /\/| *
* ISTI - Italian National Research Council | *
* \ *
* All rights reserved. *
* *
* This program 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 2 of the License, or *
* (at your option) any later version. *
* *
* This program 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 (http://www.gnu.org/licenses/gpl.txt) *
* for more details. *
* *
****************************************************************************/
#ifndef FILTER_DOCK_DIALOG_H
#define FILTER_DOCK_DIALOG_H

View File

@ -1,3 +1,25 @@
/****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyright(C) 2004-2021 \/)\/ *
* Visual Computing Lab /\/| *
* ISTI - Italian National Research Council | *
* \ *
* All rights reserved. *
* *
* This program 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 2 of the License, or *
* (at your option) any later version. *
* *
* This program 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 (http://www.gnu.org/licenses/gpl.txt) *
* for more details. *
* *
****************************************************************************/
#include "vertical_scroll_area.h"
#include <QEvent>
@ -6,18 +28,17 @@
#include "vertical_scroll_area.h"
VerticalScrollArea::VerticalScrollArea(QWidget *parent) :
QScrollArea(parent)
VerticalScrollArea::VerticalScrollArea(QWidget* parent) : QScrollArea(parent)
{
setWidgetResizable(true);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
}
bool VerticalScrollArea::eventFilter(QObject *o, QEvent *e)
bool VerticalScrollArea::eventFilter(QObject* o, QEvent* e)
{
// This works because QScrollArea::setWidget installs an eventFilter on the widget
if(o && o == widget() && e->type() == QEvent::Resize)
if (o && o == widget() && e->type() == QEvent::Resize)
setMinimumWidth(widget()->minimumSizeHint().width() + verticalScrollBar()->width());
return QScrollArea::eventFilter(o, e);

View File

@ -1,5 +1,27 @@
#ifndef VERTICALSCROLLAREA_H
#define VERTICALSCROLLAREA_H
/****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyright(C) 2004-2021 \/)\/ *
* Visual Computing Lab /\/| *
* ISTI - Italian National Research Council | *
* \ *
* All rights reserved. *
* *
* This program 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 2 of the License, or *
* (at your option) any later version. *
* *
* This program 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 (http://www.gnu.org/licenses/gpl.txt) *
* for more details. *
* *
****************************************************************************/
#ifndef VERTICAL_SCROLL_AREA_H
#define VERTICAL_SCROLL_AREA_H
#include <QScrollArea>
@ -23,4 +45,4 @@ private:
QWidget* m_scrollAreaWidgetContents;
};
#endif // VERTICALSCROLLAREA_H
#endif // VERTICAL_SCROLL_AREA_H

View File

@ -1,25 +1,25 @@
/****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyright(C) 2004-2020 \/)\/ *
* Visual Computing Lab /\/| *
* ISTI - Italian National Research Council | *
* \ *
* All rights reserved. *
* *
* This program 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 2 of the License, or *
* (at your option) any later version. *
* *
* This program 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 (http://www.gnu.org/licenses/gpl.txt) *
* for more details. *
* *
****************************************************************************/
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyright(C) 2004-2021 \/)\/ *
* Visual Computing Lab /\/| *
* ISTI - Italian National Research Council | *
* \ *
* All rights reserved. *
* *
* This program 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 2 of the License, or *
* (at your option) any later version. *
* *
* This program 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 (http://www.gnu.org/licenses/gpl.txt) *
* for more details. *
* *
****************************************************************************/
#ifndef RICHPARAMETERLISTDIALOG_H
#define RICHPARAMETERLISTDIALOG_H