summaryrefslogtreecommitdiffstats
path: root/konversation/src/dccresumedialog.h
blob: 2efc26736fef7f2a1832adfff28ba41743bb72f0 (plain)
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
/*
  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.
*/

/*
  Copyright (C) 2004 Dario Abatianni <eisfuchs@tigress.com>
  Copyright (C) 2004 Shintaro Matsuoka <shin@shoegazed.org>
*/

#ifndef DCCRESUMEDIALOG_H
#define DCCRESUMEDIALOG_H

#include <kdialogbase.h>


class KURLRequester;
class DccTransferRecv;

class DccResumeDialog : public KDialogBase
{
    Q_OBJECT
  

        public:
        enum ReceiveAction
        {
            RA_Rename    = 0x01,
            RA_Overwrite = 0x02,
            RA_Resume    = 0x04,
            RA_Cancel    = 0x08
        };

        virtual ~DccResumeDialog();

        static ReceiveAction ask(DccTransferRecv* item, const TQString& message, int enabledActions, ReceiveAction defaultAction);

    protected slots:
        void slotOk();
        void slotUser1();
        void slotCancel();
        void suggestNewName();
        void setDefaultName();
        void updateDialogButtons();

    protected:
        DccResumeDialog(DccTransferRecv* item, const TQString& caption, const TQString& message, int enabledActions, int enabledButtonCodes, KDialogBase::ButtonCode defaultButtonCode);

        // UI
        KURLRequester* m_urlreqFileURL;

        // data
        DccTransferRecv* m_item;
        int m_enabledActions;
        ReceiveAction m_selectedAction;

};
#endif