/usr/include/KF5/messagecomposer/recipientline.h is in libkf5messagecomposer-dev 4:17.12.3-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | /*
Copyright (C) 2010 Casey Link <unnamedrambler@gmail.com>
Copyright (C) 2009-2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef RECIPIENTLINE_H
#define RECIPIENTLINE_H
#include <QSharedPointer>
#include "MessageComposer/Recipient"
#include <Libkdepim/MultiplyingLine>
#include <MessageComposer/ComposerLineEdit>
#include <KComboBox>
namespace MessageComposer {
class RecipientComboBox : public KComboBox
{
Q_OBJECT
public:
explicit RecipientComboBox(QWidget *parent);
Q_SIGNALS:
void rightPressed();
protected:
void keyPressEvent(QKeyEvent *ev) override;
};
class MESSAGECOMPOSER_EXPORT RecipientLineEdit : public MessageComposer::ComposerLineEdit
{
Q_OBJECT
public:
explicit RecipientLineEdit(QWidget *parent);
Q_SIGNALS:
void deleteMe();
void leftPressed();
void rightPressed();
protected:
void keyPressEvent(QKeyEvent *ev) override;
};
class MESSAGECOMPOSER_EXPORT RecipientLineNG : public KPIM::MultiplyingLine
{
Q_OBJECT
public:
explicit RecipientLineNG(QWidget *parent);
virtual ~RecipientLineNG()
{
}
void activate() override;
bool isActive() const override;
bool isEmpty() const override;
void clear() override;
bool canDeleteLineEdit() const override;
bool isModified() const override;
void clearModified() override;
KPIM::MultiplyingLineData::Ptr data() const override;
void setData(const KPIM::MultiplyingLineData::Ptr &data) override;
void fixTabOrder(QWidget *previous) override;
QWidget *tabOut() const override;
void setCompletionMode(KCompletion::CompletionMode mode) override;
int setColumnWidth(int w) override;
// recipient specific methods
int recipientsCount() const;
void setRecipientType(Recipient::Type);
Recipient::Type recipientType() const;
QSharedPointer<Recipient> recipient() const;
void setIcon(const QIcon &icon, const QString &tooltip = QString());
/**
* Sets the config file used for storing recent addresses.
*/
void setRecentAddressConfig(KConfig *config);
void setEnableIndexSearch(bool enableIndexSearch);
bool enableIndexSearch() const;
void setEnableAkonadiSearch(bool enableAkonadiSearch);
bool enableAkonadiSearch() const;
QString rawData() const;
Q_SIGNALS:
void typeModified(RecipientLineNG *);
void addRecipient(RecipientLineNG *, const QString &);
void countChanged();
void iconClicked();
void activeChanged();
protected Q_SLOTS:
void slotEditingFinished();
void slotTypeModified();
void analyzeLine(const QString &);
protected:
bool eventFilter(QObject *watched, QEvent *event) override;
private:
void dataFromFields();
void fieldsFromData();
void slotAddRecipient(const QString &);
RecipientComboBox *mCombo = nullptr;
RecipientLineEdit *mEdit = nullptr;
int mRecipientsCount;
bool mModified;
QSharedPointer<Recipient> mData;
};
}
#endif // RECIPIENTLINE_H
|