Files
lmms/include/ResourceSelectDialog.h
Tobias Doerffel 582ce407de Added generic and flexible ResourceSelectDialog class
Functionality from QuickLoadDialog which can be used in similiar dialogs
for selecting resources has been moved into generic and highly flexible
base class ResourceSelectDialog.
2009-10-27 00:14:41 +01:00

74 lines
1.7 KiB
C++

/*
* ResourceSelectDialog.h - header file for ResourceSelectDialog
*
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _RESOURCE_SELECT_DIALOG_H
#define _RESOURCE_SELECT_DIALOG_H
#include <QtGui/QDialog>
class ResourceItem;
class ResourceModel;
class ResourceSelectDialog : public QDialog
{
Q_OBJECT
public:
enum ModelTypes
{
ListModel,
TreeModel
} ;
enum DatabaseScope
{
WorkingDirResources,
WebResources,
AllResources
} ;
ResourceSelectDialog( QWidget * _parent, ModelTypes _modelType,
DatabaseScope _databaseScope = AllResources );
virtual ~ResourceSelectDialog();
// returns the selected item (NULL if the dialog was not accepted or no
// valid item was selected)
ResourceItem * selectedItem();
protected:
void setupUi();
private slots:
void setTypeFilter( int );
private:
ResourceModel * m_model;
} ;
#endif