13#include "kdepim_export.h"
15#include "progressmanager.h"
36class OverlayWidgetPrivate;
37class KDEPIM_EXPORT OverlayWidget :
public QFrame
42 OverlayWidget(QWidget *alignWidget, QWidget *parent);
43 ~OverlayWidget()
override;
45 [[nodiscard]] QWidget *alignWidget()
const;
46 void setAlignWidget(QWidget *alignWidget);
49 void resizeEvent(QResizeEvent *ev)
override;
50 [[nodiscard]]
bool eventFilter(QObject *o, QEvent *e)
override;
53 KDEPIM_NO_EXPORT
void reposition();
56 std::unique_ptr<OverlayWidgetPrivate>
const d;
59class TransactionItemView :
public QScrollArea
63 explicit TransactionItemView(
QWidget *
parent =
nullptr,
const QString &name = QString());
65 ~TransactionItemView()
override;
67 TransactionItem *addTransactionItem(ProgressItem *item,
bool first);
69 [[nodiscard]] QSize sizeHint()
const override;
70 [[nodiscard]] QSize minimumSizeHint()
const override;
73 void slotLayoutFirstItem();
76 void resizeEvent(QResizeEvent *
event)
override;
82class TransactionItem :
public QWidget
86 TransactionItem(
QWidget *
parent, ProgressItem *item,
bool first);
88 ~TransactionItem()
override;
92 void setProgress(
int progress);
93 void setLabel(
const QString &);
97 void setStatus(
const QString &);
99 void setCryptoStatus(KPIM::ProgressItem::CryptoStatus);
100 void setTotalSteps(
int totalSteps);
102 [[nodiscard]] ProgressItem *item()
const
107 void addSubTransaction(ProgressItem *item);
111 void setItemComplete()
117 void slotItemCanceled();
120 QProgressBar *mProgress =
nullptr;
121 QPushButton *mCancelButton =
nullptr;
122 QLabel *mItemLabel =
nullptr;
123 QLabel *mItemStatus =
nullptr;
124 QFrame *mFrame =
nullptr;
125 SSLLabel *mSSLLabel =
nullptr;
126 ProgressItem *mItem =
nullptr;
129class KDEPIM_EXPORT ProgressDialog :
public OverlayWidget
133 ProgressDialog(QWidget *alignWidget, QWidget *parent);
134 ~ProgressDialog()
override;
135 void setVisible(
bool b)
override;
137 void setShowTypeProgressItem(
unsigned int type);
139 [[nodiscard]]
bool wasLastShown()
const;
142 void slotToggleVisibility();
145 void slotTransactionAdded(KPIM::ProgressItem *item);
146 void slotTransactionCompleted(KPIM::ProgressItem *item);
147 void slotTransactionCanceled(KPIM::ProgressItem *item);
148 void slotTransactionProgress(KPIM::ProgressItem *item,
unsigned int progress);
149 void slotTransactionStatus(KPIM::ProgressItem *item,
const QString &);
150 void slotTransactionLabel(KPIM::ProgressItem *item,
const QString &);
151 void slotTransactionCryptoStatus(KPIM::ProgressItem *item, KPIM::ProgressItem::CryptoStatus);
152 void slotTransactionUsesBusyIndicator(KPIM::ProgressItem *,
bool);
159 void visibilityChanged(
bool);
162 void closeEvent(QCloseEvent *)
override;
164 TransactionItemView *mScrollView =
nullptr;
165 QList<QMetaObject::Connection> mConnections;
166 QMap<const ProgressItem *, TransactionItem *> mTransactionsToListviewItems;
167 unsigned int mShowTypeProgressItem = 0;
168 bool mWasLastShown =
false;
Class KCheckComboBox::KCheckComboBoxPrivate.
virtual bool event(QEvent *e)
QObject * parent() const const