synthclone 0.3.0
Loading...
Searching...
No Matches
fileselectionview.h
Go to the documentation of this file.
1/*
2 * libsynthclone - a plugin API for `synthclone`
3 * Copyright (C) 2011 Devin Anderson
4 *
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by the
7 * Free Software Foundation; either version 2.1 of the License, or (at your
8 * option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef __SYNTHCLONE_FILESELECTIONVIEW_H__
21#define __SYNTHCLONE_FILESELECTIONVIEW_H__
22
23#include <synthclone/view.h>
24
25namespace synthclone {
26
35 class FileSelectionView: public View {
36
37 Q_OBJECT
38
39 public:
40
46 enum Operation {
49 };
50
60 };
61
69 explicit
70 FileSelectionView(QObject *parent=0);
71
77
85 bool
87
95 QString
96 getDirectory() const;
97
107
117
125 QString
126 getTitle() const;
127
128 public slots:
129
137 void
138 setDirectory(const QString &directory);
139
150 void
151 setFilesVisible(bool visible);
152
160 void
162
170 void
172
180 void
181 setTitle(const QString &title);
182
183 signals:
184
192 void
193 pathsSelected(const QStringList &paths);
194
195 private slots:
196
197 void
198 handleDialogAccept();
199
200 void
201 handleDialogReject();
202
203 };
204
205}
206
207#endif
A utility view class that handles the selection of files and directories.
Definition: fileselectionview.h:35
void setSelectionFilter(SelectionFilter filter)
Sets the FileSelectionView::SelectionFilter for this view.
void setTitle(const QString &title)
Sets the window title.
SelectionFilter getSelectionFilter() const
Gets the selection filter for this view.
QString getDirectory() const
Gets the current displayed directory.
void setOperation(Operation operation)
Sets the FileSelectionView::Operation for the view.
bool areFilesVisible() const
Gets a flag indicating whether or not files are visible in the view.
Operation
Specifies whether the view is being used to open or save a filesystem object.
Definition: fileselectionview.h:46
@ OPERATION_OPEN
Definition: fileselectionview.h:47
@ OPERATION_SAVE
Definition: fileselectionview.h:48
~FileSelectionView()
Destroys a FileSelectionView object.
FileSelectionView(QObject *parent=0)
Constructs a new FileSelectionView object.
void pathsSelected(const QStringList &paths)
Emitted when the user selects a path or path(s).
QString getTitle() const
Gets the window title.
void setFilesVisible(bool visible)
Sets a flag indicating whether or not to show files in the view.
SelectionFilter
Specifies the types of filesystem objects the user may select.
Definition: fileselectionview.h:55
@ SELECTIONFILTER_DIRECTORY
Definition: fileselectionview.h:57
@ SELECTIONFILTER_EXISTING_FILES
Definition: fileselectionview.h:59
@ SELECTIONFILTER_ANY_FILE
Definition: fileselectionview.h:56
@ SELECTIONFILTER_EXISTING_FILE
Definition: fileselectionview.h:58
Operation getOperation() const
Gets the current FileSelectionView::Operation.
void setDirectory(const QString &directory)
Sets the directory to be displayed.
Utility view class.
Definition: view.h:38
Definition: component.h:26