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
|
/***************************************************************************
kasablanca.h - description
-------------------
begin : Die Aug 19 20:54:14 CEST 2003
copyright : (C) 2003 by mkulke
email : sikor_sxe@radicalapproach.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 KASABLANCA_H
#define KASABLANCA_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
class KbDir;
class KbFile;
class KToggleAction;
class KSystemTray;
class QWidget;
class QCloseEvent;
class QLabel;
class QPixmap;
class FtpSession;
class KbStatusTip;
#include <kapplication.h>
#include <klistview.h>
#include <kmainwindow.h>
#include <kprocess.h>
#include <qdir.h>
#include <qlistview.h>
#include <qmenubar.h>
#include <qregexp.h>
#include <list>
#include "kbsiteinfo.h"
#include "kbtransferitem.h"
#include "Q_mainwindow.h"
using namespace std;
/** Kasablanca is the base class of the project */
class Kasablanca : public KMainWindow
{
Q_OBJECT
public:
enum RightClickMenu
{
Transfer = 1001,
Queue,
Delete,
Rename,
Mkdir,
Start,
Skip,
Bookmark
};
Kasablanca();
~Kasablanca();
QString m_tempdirname;
QString m_version;
list<KbSiteInfo> m_bookmarks;
KSystemTray* systemTray() const { return mp_systemtray; }
KbStatusTip* statusTip() const { return mp_statustip; }
void InitBookmarks();
public slots:
void SLOT_EditBookmarks();
void SLOT_ImportBookmarks();
void SLOT_ItemRightClickedT(QListViewItem * item, const QPoint & point, int col );
void SLOT_SelectionChanged();
void SLOT_SkipTasks();
void SLOT_ProcessQueue();
void SLOT_QueueItems(KbDirInfo *dir, FtpSession* src, FtpSession* dst, bool startqueue);
void SLOT_NextTransfer(QListViewItem* item);
void SLOT_ClearQueue(FtpSession* session);
void SLOT_LocalProcessExited(KProcess* proc) { delete proc; };
private slots:
void optionsShowToolbar();
void optionsShowStatusbar();
void optionsConfigureKeys();
void optionsConfigureToolbars();
void optionsPreferences();
void newToolbarConfig();
void applyConfig();
private:
void QueueItemsRecurse(KbDirInfo *dir, FtpSession* src, FtpSession* dst, QListViewItem* parent = NULL);
void setupStatusBar();
void setupMenu();
void setupGUI();
void setupActions();
void saveSettings();
void ProcessQueue(KbTransferItem* item);
QListViewItem* NextTransfer(QListViewItem* item);
void QueueFinished();
KasablancaMainWindow *mp_view;
QPopupMenu m_bookmarksmenu_a, m_bookmarksmenu_b;
QRegExp m_skiplist;
QPopupMenu m_rclickmenu_a, m_rclickmenu_b, m_rclickmenu_t;
QLabel *mp_statusline_a, *mp_statusline_b, *mp_encryptionicon_a, *mp_encryptionicon_b;
QPixmap m_iconencrypted, m_iconunencrypted;
KToggleAction *m_toolbarAction;
KToggleAction *m_statusbarAction;
FtpSession *mp_session_a, *mp_session_b;
list<FtpSession*> *mp_sessionlist;
bool m_skiplistenabled, m_onqueuefinishedenabled;
QString m_onqueuefinished;
KSystemTray* mp_systemtray;
KbStatusTip *mp_statustip;
};
#endif
|