Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[3e4acc]: libkwave / ConfirmCancelProxy.h Maximize Restore History

Download this file

ConfirmCancelProxy.h    71 lines (55 with data), 2.4 kB

 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
/*************************************************************************
ConfirmCancelProxy.h - ask for confirm before cancelling an action
-------------------
begin : Fri Apr 26 2002
copyright : (C) 2002 by Thomas Eschenbacher
email : Thomas.Eschenbacher@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _CONFIRM_CANCEL_PROXY_H_
#define _CONFIRM_CANCEL_PROXY_H_
#include "config.h"
#include <QObject>
#include <kdemacros.h>
class QString;
class QWidget;
class KDE_EXPORT ConfirmCancelProxy: public QObject
{
Q_OBJECT
public:
/**
* Constructor.
* @param widget a QWidget used as parent for the confirmation
* message box
* @param sender object that emits a cancelled signal, normally
* something like a QProgressDialog. Can be null, in this
* case the signal parameter is ignored and the cancel()
* method has to be called manually.
* @param signal emitted signal, e.g. SIGNAL(cancelled())
* @param receiver object that receives the cancel signal if
* a cancel has been received and the user confirmed
* @param slot receiver's cancel slot, e.g. SLOT(cancel())
*/
ConfirmCancelProxy(QWidget *widget,
QObject *sender, const char *signal,
QObject *receiver, const char *slot);
/** Destructor */
virtual ~ConfirmCancelProxy();
public slots:
/** will be connected to the sender of the cancel */
void cancel();
signals:
/** emitted if cancel was received and user confirmed */
void canceled();
private:
/** widget used for the confirm message */
QWidget *m_widget;
};
#endif /* _CONFIRM_CANCEL_PROXY_H_ */