annotate src/filenamerequester.h @ 84:b5a13baa331a

Added tag 1.3 for changeset f505df84380d
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 05 Oct 2016 14:53:39 +0200
parents 36ee5dd46fd3
children
rev   line source
50
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 /* -*- mode: c++; c-basic-offset:4 -*-
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
2 ui/filenamerequester.h
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4 This file is part of Kleopatra, the KDE keymanager
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
5 Copyright (c) 2007 Klarälvdalens Datakonsult AB
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
7 Kleopatra is free software; you can redistribute it and/or modify
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
9 the Free Software Foundation; either version 2 of the License, or
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
10 (at your option) any later version.
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12 Kleopatra is distributed in the hope that it will be useful,
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
15 General Public License for more details.
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
16
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 along with this program; if not, write to the Free Software
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
20
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
21 In addition, as a special exception, the copyright holders give
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
22 permission to link the code of this program with any edition of
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23 the Qt library by Trolltech AS, Norway (or with modified versions
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24 of Qt that use the same license as Qt), and distribute linked
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 combinations including the two. You must obey the GNU General
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 Public License in all respects for all of the code used other than
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27 Qt. If you modify this file, you may extend this exception to
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28 your version of the file, but you are not obligated to do so. If
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 you do not wish to do so, delete this exception statement from
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30 your version.
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31 */
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33 #ifndef __KLEOPATRA_UI_FILENAMEREQUESTER_H__
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 #define __KLEOPATRA_UI_FILENAMEREQUESTER_H__
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
36 #include <QWidget>
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
37
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
38 #include <QDir>
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
39
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
40 class FileNameRequester : public QWidget
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
41 {
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
42 Q_OBJECT
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
43 Q_PROPERTY(QString fileName READ fileName WRITE setFileName)
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
44 Q_PROPERTY(bool existingOnly READ existingOnly WRITE setExistingOnly)
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
45 public:
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
46 explicit FileNameRequester(QWidget *parent = Q_NULLPTR);
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
47 explicit FileNameRequester(QDir::Filters filter, QWidget *parent = Q_NULLPTR);
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
48 ~FileNameRequester();
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
49
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
50 void setFileName(const QString &name);
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
51 QString fileName() const;
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
52
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
53 void setExistingOnly(bool on);
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
54 bool existingOnly() const;
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
55
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
56 void setFilter(QDir::Filters f);
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
57 QDir::Filters filter() const;
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
58
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
59 void setNameFilter(const QString &nameFilter);
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
60 QString nameFilter() const;
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
61
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
62 Q_SIGNALS:
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
63 void fileNameChanged(const QString &filename);
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
64
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
65 private:
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
66 virtual QString requestFileName();
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
67
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
68 private:
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
69 class Private;
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
70 Private *d;
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
71 Q_PRIVATE_SLOT(d, void slotButtonClicked())
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
72 };
36ee5dd46fd3 Add GUI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
73 #endif /* __KLEOPATRA_UI_FILENAMEREQUESTER_H__ */
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)