1. Andreas Tscharner
  2. lrc


lrc / src / gui / AddRemoveHandlers.hxx

 * AddRemoveHandlers.hxx
 * Copyright 2012 Andreas Tscharner <andy@vis.ethz.ch>
 * 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
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.

/*! \file AddRemoveHandlers.hxx
 * This file contains the AddRemoveHandlers class. This class is responsible
 * for the actions if the user clicks the "Add" or "Remove" button on the
 * main window
 * \author Andreas Tscharner
 * \date 2012-08-31


#include <gtkmm/button.h>
#include <gtkmm/builder.h>
#include <gtkmm/filechooserdialog.h>
#include "ListHandler.hxx"

/*! \class AddRemoveHandlers
 *  \brief Class to handle the two main buttons
 * Class that handles the clicks on the "Add" and the "Remove" button on the
 * main window
class AddRemoveHandlers
		Glib::RefPtr<Gtk::Builder> m_refBuilder; //!< Reference to main builder
		Gtk::Button *m_addButton;      //!< Reference to "Add" button
		Gtk::Button *m_removeButton;   //!< Reference to "Remove" button
		Gtk::FileChooserDialog *m_addFilesDlg;   //!< Reference to "Add Files" dialog
		ListHandler *m_listHandler;    //!< Reference to (global) list handler class

		/*! \brief Signal handler for "Add" button
		 * This method is the actual signal handler for the "Add" button. It
		 * shows the file selection window and adds all selected files to
		 * the list of resource files
		void on_add_button_clicked(void);
		/*! \brief Signal handler for "Remove" button
		 * This method is the actual sognal handler for the "Remove" button.
		 * It removes all selected files from the list of resource files.
		void on_remove_button_clicked(void);

		/*! \brief Constructor
		 * The constructor connects the "clicked" signals of the "Add" and
		 * "Remove" buttons with the corresponding singnal handler methods
		 * \param[in] p_refBuilder Reference to the builder that loaded the
		 *                         glade GUI file
		/*! \brief Destructor
		 * Frees all the used memory

		/*! \brief Set instance of list handler
		 * This method is used to provide a ListHandler instance for this
		 * class. It should be used by the MainWindow constructor
		 * \retval NO_ERROR Instance successfully set
		int setListHandler(ListHandler *);