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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
|
/********************************************************************
* Copyright (C) 2005, 2006 Piotr Pszczolkowski
*-------------------------------------------------------------------
* This file is part of BSCommander (Beesoft Commander).
*
* BsC 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.
*
* BsC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BsC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*******************************************************************/
#ifndef INCLUDED_WORKSPACE_H
#define INCLUDED_WORKSPACE_H
/*------- include files:
-------------------------------------------------------------------*/
#ifndef INCLUDED_QFRAME_H
#include <qframe.h>
#define INCLUDED_QFRAME_H
#endif // INCLUDED_QFRAME_H
#ifndef INCLUDED_QDIR_H
#include <qdir.h>
#define INCLUDED_QDIR_H
#endif // INCLUDED_QDIR_H
#ifndef INCLUDED_VECTOR
#include <vector>
#define INCLUDED_VECTOR
#endif // INCLUDED_VECTOR
/*------- forward declarations:
-------------------------------------------------------------------*/
class QSplitter;
class LeftView;
class RightView;
class ViewWindow;
class OneFileCopier;
class ViewWindow;
class FTPCopyFrom;
class FTPCopyTo;
class MainWindow;
/*------- class declaration:
-------------------------------------------------------------------*/
class Workspace : public QFrame
{
Q_OBJECT
// ******* CONSTRUCTION *******
public:
Workspace( QWidget* const in_parent, MainWindow* const );
private:
Workspace( const Workspace& );
Workspace& operator=( const Workspace& );
// ******* MEMBERS *******
private:
static const int HANDLE_WIDTH;
static const QString CMP_FILES_CAPTION;
static const QString CMP_FILES_MSG;
static const QString CMP_FILES_ICON;
static const QString CMP_FILES_NEG_INFO;
static const QString CMP_FILES_IOERROR;
static const QString CMP_FILES_BREAK;
static const QString CMP_FILES_EQUAL;
static const QString CMP_FILES_NOT_EQUAL;
static const QString CMP_FILES_KOMPARE;
static const QString CMP_FILES_DIFF;
static const QString KOMPARE_PRG_NAME;
static const QString FilesJoining;
static const QString EnterFileName;
typedef std::vector<QString> Strings;
//....................................
enum {
LEFT_TO_RIGHT = 1,
RIGHT_TO_LEFT
};
//....................................
MainWindow* const d_main_window;
ViewWindow* d_left_view_window;
ViewWindow* d_right_view_window;
QSplitter* const d_splitter;
LeftView* const d_viewL;
RightView* const d_viewR;
FTPCopyFrom* d_ftp_copy_from;
FTPCopyTo* d_ftp_copy_to;
// ******* MTHODS *******
public:
void set_left_view_window ( ViewWindow* const in_view );
void set_right_view_window( ViewWindow* const in_view );
private:
void show ();
void ctrl_O ();
void copy_subdir ( const QString& in_src_path, const QString& in_dst_path );
void copy_next ( const QFileInfo& in_fi, const QString& in_dst_path );
bool can_copy ( const QString& in_fname );
void copy ( const int in_direction );
void pack ( const int in_direction );
void join_files ( const int in_direction );
void keyPressEvent ( QKeyEvent* e );
private slots:
void slot_switch_panels();
void configure ();
void cmp_dirs ();
void dir_synch ();
void cmp_files ();
void date_time ();
void select ();
void unselect ();
void revers ();
void slot_ftp_start ();
void slot_ftp_end ();
void slotF2 ();
void slotF3 ();
void slotF4 ();
void slotF5 ();
void slotF6 ();
void slotF7 ();
void slotF8 ();
void slotF9 ();
void lang_changed ();
void selection_changed();
void slot_tree ();
void slot_md5_create ();
void slot_md5_check ();
void disconnect_signals();
void slot_tab_new ();
void slot_tab_remove ();
void slot_ftp_rejected();
void slot_join_files ();
void after_ftp_copy ();
signals:
void looks_refresh ();
void select_left ();
void select_right ();
void unselect_left ();
void unselect_right ();
void revers_left ();
void revers_right ();
void ftp_start_left ();
void ftp_start_right ();
void ftp_end ();
void reload ();
void filter ( bool in_on );
void F2ToLeft ();
void F2ToRight ();
void F3ToLeft ();
void F3ToRight ();
void F4ToLeft ();
void F4ToRight ();
void F6ToLeft ();
void F6ToRight ();
void F7ToLeft ();
void F7ToRight ();
void F8ToLeft ();
void F8ToRight ();
void end_of_ftp ();
void stop ();
void update_lang ();
void update_selection ();
void tree_left ();
void tree_right ();
void md5_create_left ();
void md5_check_left ();
void md5_create_right ();
void md5_check_right ();
void tab_new_left ();
void tab_new_right ();
void tab_remove_left ();
void tab_remove_right ();
};
#endif // INCLUDED_WORKSPACE_H
|