You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
979 B

/*
SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include <QDateTime>
#include <QObject>
class QAction;
class ClipboardMenu : public QObject
{
Q_OBJECT
Q_PROPERTY(QDateTime currentDate READ currentDate WRITE setCurrentDate NOTIFY currentDateChanged)
Q_PROPERTY(bool secondsIncluded READ secondsIncluded WRITE setSecondsIncluded NOTIFY secondsIncludedChanged)
public:
explicit ClipboardMenu(QObject *parent = nullptr);
virtual ~ClipboardMenu();
QDateTime currentDate() const;
void setCurrentDate(const QDateTime &date);
bool secondsIncluded() const;
void setSecondsIncluded(bool secondsIncluded);
Q_INVOKABLE void setupMenu(QAction *action);
Q_SIGNALS:
void currentDateChanged();
void secondsIncludedChanged();
private:
QDateTime m_currentDate;
bool m_secondsIncluded = false;
};