Libkleo

filenamerequester.h
1/* -*- mode: c++; c-basic-offset:4 -*-
2 ui/filenamerequester.h
3
4 This file is part of Kleopatra, the KDE keymanager
5 SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "kleo_export.h"
13
14#include <QDir>
15#include <QWidget>
16
17namespace Kleo
18{
19
20class KLEO_EXPORT FileNameRequester : public QWidget
21{
22 Q_OBJECT
23 Q_PROPERTY(QString fileName READ fileName WRITE setFileName)
24 Q_PROPERTY(bool existingOnly READ existingOnly WRITE setExistingOnly)
25public:
26 explicit FileNameRequester(QWidget *parent = nullptr);
27 explicit FileNameRequester(QDir::Filters filter, QWidget *parent = nullptr);
28 ~FileNameRequester() override;
29
30 void setFileName(const QString &name);
31 QString fileName() const;
32
33 void setExistingOnly(bool on);
34 bool existingOnly() const;
35
37 QDir::Filters filter() const;
38
39 void setNameFilter(const QString &nameFilter);
40 QString nameFilter() const;
41
42 void setAccessibleNameOfLineEdit(const QString &name);
43
44Q_SIGNALS:
45 void fileNameChanged(const QString &filename);
46
47protected:
48 bool event(QEvent *event) override;
49
50private:
51 virtual QString requestFileName();
52
53private:
54 class FileNameRequesterPrivate;
55 std::unique_ptr<FileNameRequesterPrivate> const d;
56};
57
58}
Q_SCRIPTABLE bool setFilter(const QString &filter)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
typedef Filters
QFuture< void > filter(Sequence &sequence, KeepFunctor filterFunction)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:39:42 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.