summaryrefslogtreecommitdiffstats
path: root/src/app/GUI/syncbrowsebutton.h
blob: 75e8ed8831a06d6fb3e003c3432d79d229d24fc3 (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
61
62
63
64
65
66
67
/***************************************************************************
                          syncbrowsebutton.h  -  description
                             -------------------
    copyright            : (C) 2004 by Jonas Bähr
    e-mail               : krusader@users.sourceforge.net
    web site             : http://krusader.sourceforge.net
 ---------------------------------------------------------------------------
  Description
 ***************************************************************************
This is the button which toggles the synchron-browse-mode (a directory-change
is done in both panels)
I could imagine an optional extension which also performs mkdir etc. in the other panel
or in ALL tabs on the other side (this could also include copy-actions to this panels)
This is very handy if you have several identical clients which you want to update
simoultanious.

The current version only manages sync-browse and got no mode-switch options.
 
 ***************************************************************************
 *                                                                         *
 *   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 SYNCBROWSEBUTTON_H
#define SYNCBROWSEBUTTON_H

#include <tqtoolbutton.h>

// No synchrone browsing
#define SYNCBROWSE_OFF		0
// Change only the directory
#define SYNCBROWSE_CD			1
/*
// Make new dirs in both panels
#define SYNCBROWSE_MKDIR		2
// Delete in both panels
#define SYNCBROWSE_DELETE		4

// Do everything in all tabs on the other side (not only the oposite panel)
#define SYNCBROWSE_ALLTABS		1024
// Copy files not only to the other panel but to all tabs on the other side
#define SYNCBROWSE_COPY		2048
*/

class SyncBrowseButton : public TQToolButton  {
   TQ_OBJECT
  
public: 
  SyncBrowseButton(TQWidget *parent=0, const char *name=0);
  ~SyncBrowseButton();
  
  int state();

protected:
  int _state;
  TQPixmap _icon_on;
  TQPixmap _icon_off;
  
private slots:
  void slotToggled(bool on);
};

#endif