summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfm.h
blob: a4f2510cffcb28d9f4bece19a94105547087facd (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
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
185
186
187
188
189
190
/***************************************************************************
   advancedfm.h
                             -------------------
                             ** Created: Sat Mar 9 23:33:09 2002
    copyright            : (C) 2002 by ljp
    email                : ljp@llornkcor.com
    *   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 ADVANCEDFM_H
#define ADVANCEDFM_H
#define QTOPIA_INTERNAL_FSLP // to get access to fileproperties
#define QT_QWS_OPIE

#include <opie2/oprocess.h>
#include <opie2/osplitter.h>

#include <qpe/ir.h>
#include <qpe/qcopenvelope_qws.h>

#include <qvariant.h>
#include <qdialog.h>
#include <qmainwindow.h>
#include <qstringlist.h>
#include <qdir.h>
#include <qstring.h>
#include <qpoint.h>
#include <qtimer.h>
#include <qpixmap.h>


class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
class QListView;
class QListviewItem;
class QLabel;
class QProgressBar;
class QSpinBox;
class QWidget;
class QPopupMenu;
class QFile;
class QListViewItem;
class QLineEdit;
class MenuButton;

class QToolButton;
class Ir;

class AdvancedFm : public QMainWindow
{
    Q_OBJECT
public:
    static QString appName() { return QString::fromLatin1("advancedfm"); }
   AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0);
   ~AdvancedFm();
protected:

   Opie::Ui::OSplitter *TabWidget;
   QCopChannel * channel;
   QPixmap unknownXpm;
   int whichTab;
//    QTabWidget *TabWidget;
   QWidget *tab, *tab_2, *tab_3;
   QListView *Local_View, *Remote_View;

   QLineEdit *currentPathEdit;
   QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/;
   QToolButton  *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
//    QPushButton  *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
   QDir currentDir, currentRemoteDir;
   QComboBox *currentPathCombo;
   QString filterStr, s_addBookmark, s_removeBookmark;
   QListViewItem * item;
   bool b;
   QStringList fileSystemTypeList, fsList;
   int currentServerConfig;
   QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3;
   QStringList remoteDirPathStringList, localDirPathStringList;
   QLineEdit *renameBox;

   void init();
   void initConnections();
   void keyReleaseEvent( QKeyEvent *);
   void keyPressEvent( QKeyEvent *);
   QString getFileSystemType(const QString &);
   QString getDiskSpace(const QString &);
   void parsetab(const QString &fileName);
   QString checkDiskSpace(const QString &);
   QString dealWithSymName(const QString &);
   QDir *CurrentDir();
   QDir *OtherDir();
   QListView *CurrentView();
   QListView *OtherView();
   void setOtherTabCurrent();

//protected signals:
//		void newPath(QString);
    
protected slots:
	 void changeTo(const QString &);
   void slotSwitchMenu(int);
   void selectAll();
   void addToDocs();
   void doDirChange();
   void mkDir();
   void del();
   void rn();
   void populateView();
   void rePopulate();
   void showHidden();
   void showMenuHidden();
   void ListClicked(QListViewItem *);
   void ListPressed( int, QListViewItem *, const QPoint&, int);
   void makeDir();
   void doDelete();
   void tabChanged(QWidget*);
   void cleanUp();
   void renameIt();
   void runThis();
   void runText();
   void filePerms();
   void doProperties();
   void runCommand();
   void runCommandStd();
   QStringList getPath();
   void mkSym();
   void switchToLocalTab();
   void switchToRemoteTab();
	 void refreshCurrentTab();

   void openSearch();
   void dirMenuSelected(int);
   void showFileMenu();   
   void homeButtonPushed();
   void docButtonPushed();
   void SDButtonPushed();
   void CFButtonPushed();
   void QPEButtonPushed();
   void upDir();
   void currentPathComboChanged();

   void copy();
   void copyTimer();
   void copyAs();
   void copyAsTimer();
   void copySameDir();
   void copySameDirTimer();
   void move();
   void moveTimer();

   void fillCombo(const QString &);
   bool copyFile( const QString & , const QString & );
   void fileStatus();
   void doAbout();
   void doBeam();
   void fileBeamFinished( Ir *);
   bool copyDirectory( const QString & , const QString & );
//   void navigateToSelected();
   bool moveDirectory( const QString & , const QString & );
	 
//   void slotSwitchtoLocal(int);

private:
   MenuButton *menuButton;
   QString oldName, localViewDir, remoteViewDir;
   void startProcess(const QString &);
   bool eventFilter( QObject * , QEvent * );
   void cancelRename();
   void doRename(QListView *);
   void okRename();
   void customDirsToMenu();
   void addCustomDir();
   void removeCustomDir();
   void navigateToSelected();

private slots:
   void processEnded(Opie::Core::OProcess *);
   void oprocessStderr(Opie::Core::OProcess *, char *, int);
   void gotoCustomDir(const QString &);
   void qcopReceive(const QCString&, const QByteArray&);
   void setDocument(const QString &);
//	 void doMenu(int

};

#endif // ADVANCEDFM_H