Skip to content

Commit

Permalink
Various fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
dhood committed Apr 6, 2018
1 parent ff5d88f commit 5b6d519
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/rviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ add_library(${PROJECT_NAME}
message_filter_display.h
mesh_loader.cpp
new_object_dialog.cpp
preferences_dialog.cpp
add_display_dialog.cpp
ogre_helpers/apply_visibility_bits.cpp
ogre_helpers/arrow.cpp
Expand All @@ -72,6 +71,7 @@ add_library(${PROJECT_NAME}
panel.cpp
panel_dock_widget.cpp
panel_factory.cpp
preferences_dialog.cpp
properties/bool_property.cpp
properties/color_editor.cpp
properties/color_property.cpp
Expand Down
16 changes: 2 additions & 14 deletions src/rviz/preferences_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,24 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <map>

#include <boost/filesystem.hpp>

#include <ros/package.h>
#include <ros/ros.h>

#include <QGroupBox>
#include <QTreeWidget>
#include <QLabel>
#include <QLineEdit>
#include <QCheckBox>
#include <QTextBrowser>
#include <QVBoxLayout>
#include <QDialogButtonBox>
#include <QPushButton>

#include "preferences_dialog.h"
#include "rviz/load_resource.h"
#include "rviz/preferences.h"

namespace rviz
{

PreferencesDialog::PreferencesDialog( Factory* factory,
Preferences *preferences,
Preferences* preferences_output,
QWidget* parent)
: QDialog( parent )
, factory_( factory )
, preferences_( preferences)
, preferences_( preferences_output )
{
//***** Layout

Expand Down
26 changes: 6 additions & 20 deletions src/rviz/preferences_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@

#include "rviz/factory.h"

class QTreeWidget;
class QTreeWidgetItem;
class QTextBrowser;
class QLineEdit;
class QCheckBox;
class QDialogButtonBox;
class QLabel;

namespace rviz
{
Expand All @@ -50,23 +46,13 @@ class PreferencesDialog : public QDialog
{
Q_OBJECT
public:
/** Dialog for choosing a new object to load with a pluginlib ClassLoader.
/** Dialog for setting preferences.
*
* @param disallowed_display_names set of display names to prevent
* the user from using.
*
* @param disallowed_class_lookup_names set of class lookup names to
* prevent the user from selecting. Names found in the class loader
* which are in this list will appear disabled.
*
* @param lookup_name_output Pointer to a string where dialog will
* put the class lookup name chosen.
*
* @param display_name_output Pointer to a string where dialog will
* put the display name entered, or NULL (default) if display
* name entry field should not be shown. */
* @param preferences_output Pointer to Preferences struct where
* preferences chosen by the user will be put.
*/
PreferencesDialog( Factory* factory,
Preferences* preferences,
Preferences* preferences_output,
QWidget* parent = 0 );

virtual QSize sizeHint () const;
Expand Down
2 changes: 1 addition & 1 deletion src/rviz/visualization_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ bool VisualizationFrame::prepareToExit()

savePersistentSettings();

if( isWindowModified() && preferences_->prompt_save_on_exit)
if( isWindowModified() && preferences_->prompt_save_on_exit )
{
QMessageBox box( this );
box.setText( "There are unsaved changes." );
Expand Down
2 changes: 1 addition & 1 deletion src/rviz/visualization_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ protected Q_SLOTS:
void onRecentConfigSelected();
void onHelpWiki();
void onHelpAbout();
void openPreferencesDialog();
void openNewPanelDialog();
void openNewToolDialog();
void openPreferencesDialog();
void showHelpPanel();

/** @brief Remove a the tool whose name is given by remove_tool_menu_action->text(). */
Expand Down

0 comments on commit 5b6d519

Please sign in to comment.