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 void setButtonHint(const QString &text);
44
45Q_SIGNALS:
46 void fileNameChanged(const QString &filename);
47
48protected:
49 bool event(QEvent *event) override;
50
51private:
52 virtual QString requestFileName();
53
54private:
55 class FileNameRequesterPrivate;
56 std::unique_ptr<FileNameRequesterPrivate> const d;
57};
58
59}
Q_SCRIPTABLE bool setFilter(const QString &filter)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.