Renaming the dialog and associated function to remove "polyhedron" from the name

This commit is contained in:
Maxime Gimeno 2016-01-13 08:33:12 +01:00
parent 97ba0f33f4
commit bae76bc5d8
4 changed files with 14 additions and 14 deletions

View File

@ -111,7 +111,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
qt5_wrap_ui( MainWindowUI_files MainWindow.ui)
qt5_wrap_ui( statisticsUI_FILES Polyhedron_demo_statistics_on_polyhedron_dialog.ui)
qt5_wrap_ui( statisticsUI_FILES Statistics_on_item_dialog.ui)
qt5_wrap_ui( FileLoaderDialogUI_files FileLoaderDialog.ui )
qt5_wrap_ui( Show_point_dialogUI_FILES Show_point_dialog.ui )
qt5_wrap_ui( PreferencesUI_FILES Preferences.ui )

View File

@ -42,7 +42,7 @@
#include "ui_MainWindow.h"
#include "ui_Preferences.h"
#include "ui_Polyhedron_demo_statistics_on_polyhedron_dialog.h"
#include "ui_Statistics_on_item_dialog.h"
#include "Show_point_dialog.h"
#include "File_loader_dialog.h"
@ -1179,7 +1179,7 @@ void MainWindow::showSceneContextMenu(int selectedItemIndex,
menu->addAction(tr("Statistics..."));
actionStatistics->setObjectName("actionStatisticsOnPolyhedron");
connect(actionStatistics, SIGNAL(triggered()),
this, SLOT(statistics_on_polyhedron()));
this, SLOT(statistics_on_item()));
menu->addSeparator();
if(!item->property("source filename").toString().isEmpty()) {
QAction* reload = menu->addAction(tr("&Reload item from file"));
@ -1758,26 +1758,26 @@ void MainWindow::stat_dlg_update()
{
if(statistics_dlg)
statistics_dlg->hide();
statistics_on_polyhedron();
statistics_on_item();
}
void MainWindow::statistics_on_polyhedron()
void MainWindow::statistics_on_item()
{
if(statistics_dlg)
delete statistics_dlg;
statistics_dlg = new QDialog(this);
Ui::Polyhedron_demo_statistics_on_polyhedron_dialog ui;
Ui::Statistics_on_item_dialog ui;
ui.setupUi(statistics_dlg);
connect(ui.okButtonBox, SIGNAL(accepted()), statistics_dlg, SLOT(accept()));
connect(ui.updateButton, SIGNAL(clicked()), this, SLOT(stat_dlg_update()));
ui.label_htmltab->setText(get_polyhedron_stats());
ui.label_htmltab->setText(get_item_stats());
statistics_dlg->show();
statistics_dlg->raise();
}
/* Creates a string containing an html table. This string is constructed by appending each parts of each row, so that the data can
depend on the number of selected items. This String is then returned.*/
QString MainWindow::get_polyhedron_stats()
QString MainWindow::get_item_stats()
{
//1st step : get all classnames of the selected items
QList<QString> classnames;

View File

@ -82,7 +82,7 @@ public Q_SLOTS:
/// given a file extension file, returns true if `filename` matches the filter
bool file_matches_filter(const QString& filters, const QString& filename);
//!Prints a dialog containing statistics on the selected polyhedrons.
void statistics_on_polyhedron();
void statistics_on_item();
//!Updates the statistics dialog.
void stat_dlg_update();
/*! Open a file with a given loader, and return true if it was successful.
@ -341,7 +341,7 @@ protected:
QList<int> getSelectedSceneItemIndices() const;
private:
void recurseExpand(QModelIndex index);
QString get_polyhedron_stats();
QString get_item_stats();
QString strippedName(const QString &fullFileName);
void setMenus(QString, QString, QAction *a);
/// plugin black-list

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Polyhedron_demo_statistics_on_polyhedron_dialog</class>
<widget class="QDialog" name="Polyhedron_demo_statistics_on_polyhedron_dialog">
<class>Statistics_on_item_dialog</class>
<widget class="QDialog" name="Statistics_on_item_dialog">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
@ -70,7 +70,7 @@
<connection>
<sender>okButtonBox</sender>
<signal>rejected()</signal>
<receiver>Polyhedron_demo_statistics_on_polyhedron_dialog</receiver>
<receiver>Statistics_on_item_dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
@ -86,7 +86,7 @@
<connection>
<sender>okButtonBox</sender>
<signal>accepted()</signal>
<receiver>Polyhedron_demo_statistics_on_polyhedron_dialog</receiver>
<receiver>Statistics_on_item_dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">