author | llornkcor <llornkcor> | 2002-07-11 16:36:34 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-11 16:36:34 (UTC) |
commit | 1651f048bb129b8e748a01c514d84c8626e0f1e2 (patch) (unidiff) | |
tree | 9b2783cfbb8b754a5aae098b2f4ae165b65f340c | |
parent | f568737c20bea96fb79d85681a72e142ec05d66f (diff) | |
download | opie-1651f048bb129b8e748a01c514d84c8626e0f1e2.zip opie-1651f048bb129b8e748a01c514d84c8626e0f1e2.tar.gz opie-1651f048bb129b8e748a01c514d84c8626e0f1e2.tar.bz2 |
added messageboc when copy, or move fileif file exists to ask ok to delete, added copy same dir to menu
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 314 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 1 |
2 files changed, 232 insertions, 83 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 9e38d14..f97ae99 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -1,265 +1,265 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | AdvancedFm.cpp | 2 | AdvancedFm.cpp |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #define DEVELOPERS_VERSION | 12 | #define DEVELOPERS_VERSION |
13 | #define QTOPIA_INTERNAL_FSLP // to get access to fileproperties | 13 | #define QTOPIA_INTERNAL_FSLP // to get access to fileproperties |
14 | 14 | ||
15 | #include "advancedfm.h" | 15 | #include "advancedfm.h" |
16 | #include "inputDialog.h" | 16 | #include "inputDialog.h" |
17 | #include "filePermissions.h" | 17 | #include "filePermissions.h" |
18 | #include "output.h" | 18 | #include "output.h" |
19 | 19 | ||
20 | #include <opie/ofileselector.h> | 20 | #include <opie/ofileselector.h> |
21 | #include <opie/ofiledialog.h> | 21 | #include <opie/ofiledialog.h> |
22 | 22 | ||
23 | 23 | ||
24 | #include <qpe/lnkproperties.h> | 24 | #include <qpe/lnkproperties.h> |
25 | #include <qpe/filemanager.h> | 25 | #include <qpe/filemanager.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 26 | #include <qpe/qcopenvelope_qws.h> |
27 | #include <qpe/qpemenubar.h> | 27 | #include <qpe/qpemenubar.h> |
28 | #include <qpe/qpetoolbar.h> | 28 | #include <qpe/qpetoolbar.h> |
29 | #include <qpe/qpeapplication.h> | 29 | #include <qpe/qpeapplication.h> |
30 | #include <qpe/resource.h> | 30 | #include <qpe/resource.h> |
31 | #include <qpe/qcopenvelope_qws.h> | 31 | #include <qpe/qcopenvelope_qws.h> |
32 | #include <qpe/config.h> | 32 | #include <qpe/config.h> |
33 | #include <qpe/mimetype.h> | 33 | #include <qpe/mimetype.h> |
34 | #include <qpe/applnk.h> | 34 | #include <qpe/applnk.h> |
35 | #include <qpe/ir.h> | 35 | #include <qpe/ir.h> |
36 | 36 | ||
37 | //#include <opie/ofileselector.h> | 37 | //#include <opie/ofileselector.h> |
38 | #include <qmultilineedit.h> | 38 | #include <qmultilineedit.h> |
39 | 39 | ||
40 | #include <qtextstream.h> | 40 | #include <qtextstream.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qtoolbutton.h> | 42 | #include <qtoolbutton.h> |
43 | #include <qdatetime.h> | 43 | #include <qdatetime.h> |
44 | #include <qdir.h> | 44 | #include <qdir.h> |
45 | #include <qfile.h> | 45 | #include <qfile.h> |
46 | #include <qstring.h> | 46 | #include <qstring.h> |
47 | #include <qcombobox.h> | 47 | #include <qcombobox.h> |
48 | #include <qpopupmenu.h> | 48 | #include <qpopupmenu.h> |
49 | #include <qlistview.h> | 49 | #include <qlistview.h> |
50 | #include <qmainwindow.h> | 50 | #include <qmainwindow.h> |
51 | #include <qlabel.h> | 51 | #include <qlabel.h> |
52 | #include <qprogressbar.h> | 52 | #include <qprogressbar.h> |
53 | #include <qspinbox.h> | 53 | #include <qspinbox.h> |
54 | #include <qtabwidget.h> | 54 | #include <qtabwidget.h> |
55 | #include <qwidget.h> | 55 | #include <qwidget.h> |
56 | #include <qlayout.h> | 56 | #include <qlayout.h> |
57 | #include <qimage.h> | 57 | #include <qimage.h> |
58 | #include <qpixmap.h> | 58 | #include <qpixmap.h> |
59 | #include <qmessagebox.h> | 59 | #include <qmessagebox.h> |
60 | #include <qlineedit.h> | 60 | #include <qlineedit.h> |
61 | #include <qregexp.h> | 61 | #include <qregexp.h> |
62 | 62 | ||
63 | #include <unistd.h> | 63 | #include <unistd.h> |
64 | #include <stdlib.h> | 64 | #include <stdlib.h> |
65 | #include <sys/stat.h> | 65 | #include <sys/stat.h> |
66 | #include <dirent.h> | 66 | #include <dirent.h> |
67 | #include <stdio.h> | 67 | #include <stdio.h> |
68 | #include <time.h> | 68 | #include <time.h> |
69 | #include <fcntl.h> | 69 | #include <fcntl.h> |
70 | #include <mntent.h> | 70 | #include <mntent.h> |
71 | #include <string.h> | 71 | #include <string.h> |
72 | #include <errno.h> | 72 | #include <errno.h> |
73 | 73 | ||
74 | AdvancedFm::AdvancedFm( ) | 74 | AdvancedFm::AdvancedFm( ) |
75 | : QMainWindow( ) | 75 | : QMainWindow( ) |
76 | { | 76 | { |
77 | setCaption( tr( "AdvancedFm" ) ); | 77 | setCaption( tr( "AdvancedFm" ) ); |
78 | // menuTimer( this ); | 78 | // menuTimer( this ); |
79 | 79 | ||
80 | QGridLayout *layout = new QGridLayout( this ); | 80 | QGridLayout *layout = new QGridLayout( this ); |
81 | layout->setSpacing( 2); | 81 | layout->setSpacing( 2); |
82 | layout->setMargin( 2); | 82 | layout->setMargin( 2); |
83 | 83 | ||
84 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 84 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
85 | 85 | ||
86 | QPEMenuBar *menuBar = new QPEMenuBar(this); | 86 | QPEMenuBar *menuBar = new QPEMenuBar(this); |
87 | // fileMenu = new QPopupMenu( this ); | 87 | // fileMenu = new QPopupMenu( this ); |
88 | fileMenu = new QPopupMenu( this ); | 88 | fileMenu = new QPopupMenu( this ); |
89 | viewMenu = new QPopupMenu( this ); | 89 | viewMenu = new QPopupMenu( this ); |
90 | 90 | ||
91 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 ); | 91 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 ); |
92 | 92 | ||
93 | menuBar->insertItem( tr( "File" ), fileMenu); | 93 | menuBar->insertItem( tr( "File" ), fileMenu); |
94 | menuBar->insertItem( tr( "View" ), viewMenu); | 94 | menuBar->insertItem( tr( "View" ), viewMenu); |
95 | 95 | ||
96 | qpeDirButton= new QToolButton(this,"QPEButton"); | 96 | qpeDirButton= new QToolButton(this,"QPEButton"); |
97 | qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); | 97 | qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); |
98 | // qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton"); | 98 | // qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton"); |
99 | qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); | 99 | qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); |
100 | connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); | 100 | connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); |
101 | //qpeDirButton->setFlat(TRUE); | 101 | //qpeDirButton->setFlat(TRUE); |
102 | layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); | 102 | layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); |
103 | 103 | ||
104 | cfButton = new QToolButton( this,"CFButton"); | 104 | cfButton = new QToolButton( this,"CFButton"); |
105 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); | 105 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); |
106 | // cfButton = new QPushButton(Resource::loadIconSet("cardmon/pcmcia"),"",this,"CFButton"); | 106 | // cfButton = new QPushButton(Resource::loadIconSet("cardmon/pcmcia"),"",this,"CFButton"); |
107 | cfButton ->setFixedSize( QSize( 20, 20 ) ); | 107 | cfButton ->setFixedSize( QSize( 20, 20 ) ); |
108 | connect( cfButton ,SIGNAL(released()),this,SLOT( CFButtonPushed()) ); | 108 | connect( cfButton ,SIGNAL(released()),this,SLOT( CFButtonPushed()) ); |
109 | //cfButton->setFlat(TRUE); | 109 | //cfButton->setFlat(TRUE); |
110 | layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); | 110 | layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); |
111 | 111 | ||
112 | sdButton = new QToolButton( this,"SDButton"); | 112 | sdButton = new QToolButton( this,"SDButton"); |
113 | sdButton->setPixmap(Resource::loadPixmap("sdmon/sdcard")); | 113 | sdButton->setPixmap(Resource::loadPixmap("sdmon/sdcard")); |
114 | // sdButton = new QPushButton(Resource::loadIconSet("sdmon/sdcard"),"",this,"SDButton"); | 114 | // sdButton = new QPushButton(Resource::loadIconSet("sdmon/sdcard"),"",this,"SDButton"); |
115 | sdButton->setFixedSize( QSize( 20, 20 ) ); | 115 | sdButton->setFixedSize( QSize( 20, 20 ) ); |
116 | connect( sdButton ,SIGNAL(released()),this,SLOT( SDButtonPushed()) ); | 116 | connect( sdButton ,SIGNAL(released()),this,SLOT( SDButtonPushed()) ); |
117 | // sdButton->setFlat(TRUE); | 117 | // sdButton->setFlat(TRUE); |
118 | layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); | 118 | layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); |
119 | 119 | ||
120 | cdUpButton = new QToolButton( this,"cdUpButton"); | 120 | cdUpButton = new QToolButton( this,"cdUpButton"); |
121 | cdUpButton->setPixmap(Resource::loadPixmap("up")); | 121 | cdUpButton->setPixmap(Resource::loadPixmap("up")); |
122 | // cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); | 122 | // cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); |
123 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); | 123 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); |
124 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); | 124 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); |
125 | //cdUpButton ->setFlat(TRUE); | 125 | //cdUpButton ->setFlat(TRUE); |
126 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); | 126 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); |
127 | 127 | ||
128 | docButton = new QToolButton( this,"docsButton"); | 128 | docButton = new QToolButton( this,"docsButton"); |
129 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); | 129 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); |
130 | // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); | 130 | // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); |
131 | docButton->setFixedSize( QSize( 20, 20 ) ); | 131 | docButton->setFixedSize( QSize( 20, 20 ) ); |
132 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); | 132 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); |
133 | // docButton->setFlat(TRUE); | 133 | // docButton->setFlat(TRUE); |
134 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); | 134 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); |
135 | 135 | ||
136 | homeButton = new QToolButton( this,"homeButton"); | 136 | homeButton = new QToolButton( this,"homeButton"); |
137 | homeButton->setPixmap(Resource::loadPixmap("home")); | 137 | homeButton->setPixmap(Resource::loadPixmap("home")); |
138 | // homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); | 138 | // homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); |
139 | homeButton->setFixedSize( QSize( 20, 20 ) ); | 139 | homeButton->setFixedSize( QSize( 20, 20 ) ); |
140 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); | 140 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); |
141 | // homeButton->setFlat(TRUE); | 141 | // homeButton->setFlat(TRUE); |
142 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); | 142 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); |
143 | // fileMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); | 143 | // fileMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); |
144 | // fileMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); | 144 | // fileMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); |
145 | // fileMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); | 145 | // fileMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); |
146 | 146 | ||
147 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 147 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
148 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 148 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
149 | fileMenu->insertSeparator(); | 149 | fileMenu->insertSeparator(); |
150 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); | 150 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); |
151 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); | 151 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); |
152 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); | 152 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); |
153 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); | 153 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); |
154 | fileMenu->insertSeparator(); | 154 | fileMenu->insertSeparator(); |
155 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); | 155 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); |
156 | fileMenu->setCheckable(TRUE); | 156 | fileMenu->setCheckable(TRUE); |
157 | 157 | ||
158 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 158 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); |
159 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 159 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); |
160 | viewMenu->insertSeparator(); | 160 | viewMenu->insertSeparator(); |
161 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 161 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
162 | viewMenu->setCheckable(TRUE); | 162 | viewMenu->setCheckable(TRUE); |
163 | 163 | ||
164 | 164 | ||
165 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); | 165 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); |
166 | currentPathCombo->setEditable(TRUE); | 166 | currentPathCombo->setEditable(TRUE); |
167 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); | 167 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); |
168 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 168 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
169 | 169 | ||
170 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 170 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), |
171 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 171 | this, SLOT( currentPathComboActivated( const QString & ) ) ); |
172 | 172 | ||
173 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 173 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), |
174 | this,SLOT(currentPathComboChanged())); | 174 | this,SLOT(currentPathComboChanged())); |
175 | 175 | ||
176 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 176 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
177 | 177 | ||
178 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); | 178 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); |
179 | 179 | ||
180 | 180 | ||
181 | TabWidget = new QTabWidget( this, "TabWidget" ); | 181 | TabWidget = new QTabWidget( this, "TabWidget" ); |
182 | layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); | 182 | layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); |
183 | 183 | ||
184 | tab = new QWidget( TabWidget, "tab" ); | 184 | tab = new QWidget( TabWidget, "tab" ); |
185 | tabLayout = new QGridLayout( tab ); | 185 | tabLayout = new QGridLayout( tab ); |
186 | tabLayout->setSpacing( 2); | 186 | tabLayout->setSpacing( 2); |
187 | tabLayout->setMargin( 2); | 187 | tabLayout->setMargin( 2); |
188 | 188 | ||
189 | Local_View = new QListView( tab, "Local_View" ); | 189 | Local_View = new QListView( tab, "Local_View" ); |
190 | // Local_View->setResizePolicy( QListView::AutoOneFit ); | 190 | // Local_View->setResizePolicy( QListView::AutoOneFit ); |
191 | Local_View->addColumn( tr("File"),130); | 191 | Local_View->addColumn( tr("File"),130); |
192 | Local_View->addColumn( tr("Size"),-1); | 192 | Local_View->addColumn( tr("Size"),-1); |
193 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 193 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
194 | Local_View->addColumn( tr("Date"),-1); | 194 | Local_View->addColumn( tr("Date"),-1); |
195 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 195 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
196 | Local_View->setAllColumnsShowFocus(TRUE); | 196 | Local_View->setAllColumnsShowFocus(TRUE); |
197 | Local_View->setMultiSelection( TRUE ); | 197 | Local_View->setMultiSelection( TRUE ); |
198 | Local_View->setSelectionMode(QListView::Extended); | 198 | Local_View->setSelectionMode(QListView::Extended); |
199 | 199 | ||
200 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 200 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
201 | 201 | ||
202 | 202 | ||
203 | 203 | ||
204 | tabLayout->addWidget( Local_View, 0, 0 ); | 204 | tabLayout->addWidget( Local_View, 0, 0 ); |
205 | 205 | ||
206 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 206 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), |
207 | this,SLOT( localListClicked(QListViewItem *)) ); | 207 | this,SLOT( localListClicked(QListViewItem *)) ); |
208 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 208 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
209 | this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) ); | 209 | this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) ); |
210 | 210 | ||
211 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | 211 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); |
212 | 212 | ||
213 | TabWidget->insertTab( tab, tr("1")); | 213 | TabWidget->insertTab( tab, tr("1")); |
214 | 214 | ||
215 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 215 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
216 | tabLayout_2 = new QGridLayout( tab_2 ); | 216 | tabLayout_2 = new QGridLayout( tab_2 ); |
217 | tabLayout_2->setSpacing( 2); | 217 | tabLayout_2->setSpacing( 2); |
218 | tabLayout_2->setMargin( 2); | 218 | tabLayout_2->setMargin( 2); |
219 | 219 | ||
220 | Remote_View = new QListView( tab_2, "Remote_View" ); | 220 | Remote_View = new QListView( tab_2, "Remote_View" ); |
221 | Remote_View->addColumn( tr("File"),130); | 221 | Remote_View->addColumn( tr("File"),130); |
222 | Remote_View->addColumn( tr("Size"),-1); | 222 | Remote_View->addColumn( tr("Size"),-1); |
223 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 223 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
224 | Remote_View->addColumn( tr("Date"),-1); | 224 | Remote_View->addColumn( tr("Date"),-1); |
225 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 225 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
226 | Remote_View->setAllColumnsShowFocus(TRUE); | 226 | Remote_View->setAllColumnsShowFocus(TRUE); |
227 | Remote_View->setMultiSelection( TRUE ); | 227 | Remote_View->setMultiSelection( TRUE ); |
228 | Remote_View->setSelectionMode(QListView::Extended); | 228 | Remote_View->setSelectionMode(QListView::Extended); |
229 | 229 | ||
230 | 230 | ||
231 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 231 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
232 | 232 | ||
233 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 233 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), |
234 | this,SLOT( remoteListClicked(QListViewItem *)) ); | 234 | this,SLOT( remoteListClicked(QListViewItem *)) ); |
235 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 235 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
236 | this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) ); | 236 | this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) ); |
237 | // connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | 237 | // connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); |
238 | 238 | ||
239 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 239 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
240 | 240 | ||
241 | 241 | ||
242 | TabWidget->insertTab( tab_2, tr( "2")); | 242 | TabWidget->insertTab( tab_2, tr( "2")); |
243 | 243 | ||
244 | connect(TabWidget,SIGNAL(currentChanged(QWidget *)), | 244 | connect(TabWidget,SIGNAL(currentChanged(QWidget *)), |
245 | this,SLOT(tabChanged(QWidget*))); | 245 | this,SLOT(tabChanged(QWidget*))); |
246 | 246 | ||
247 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); | 247 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); |
248 | tabLayout_3 = new QGridLayout( tab_3 ); | 248 | tabLayout_3 = new QGridLayout( tab_3 ); |
249 | tabLayout_3->setSpacing( 2); | 249 | tabLayout_3->setSpacing( 2); |
250 | tabLayout_3->setMargin( 2); | 250 | tabLayout_3->setMargin( 2); |
251 | 251 | ||
252 | 252 | ||
253 | // OFileDialog fileDialog; | 253 | // OFileDialog fileDialog; |
254 | // fileDialog; | 254 | // fileDialog; |
255 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy | 255 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy |
256 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); | 256 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); |
257 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); | 257 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); |
258 | 258 | ||
259 | QListView *fileTree; | 259 | QListView *fileTree; |
260 | fileTree = new QListView( tab_3, "tree" ); | 260 | fileTree = new QListView( tab_3, "tree" ); |
261 | 261 | ||
262 | 262 | ||
263 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); | 263 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); |
264 | 264 | ||
265 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); | 265 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); |
@@ -1060,404 +1060,551 @@ void AdvancedFm::doProperties() { | |||
1060 | LnkProperties prop( &lnk ); | 1060 | LnkProperties prop( &lnk ); |
1061 | // connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); | 1061 | // connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); |
1062 | prop.showMaximized(); | 1062 | prop.showMaximized(); |
1063 | prop.exec(); | 1063 | prop.exec(); |
1064 | } | 1064 | } |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | QStringList AdvancedFm::getPath() { | 1067 | QStringList AdvancedFm::getPath() { |
1068 | QStringList strList; | 1068 | QStringList strList; |
1069 | if (TabWidget->currentPageIndex() == 0) { | 1069 | if (TabWidget->currentPageIndex() == 0) { |
1070 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); | 1070 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |
1071 | QListViewItemIterator it( Local_View ); | 1071 | QListViewItemIterator it( Local_View ); |
1072 | for ( ; it.current(); ++it ) { | 1072 | for ( ; it.current(); ++it ) { |
1073 | if ( it.current()->isSelected() ) { | 1073 | if ( it.current()->isSelected() ) { |
1074 | strList << it.current()->text(0); | 1074 | strList << it.current()->text(0); |
1075 | } | 1075 | } |
1076 | } | 1076 | } |
1077 | return strList; | 1077 | return strList; |
1078 | } else { | 1078 | } else { |
1079 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); | 1079 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); |
1080 | QListViewItemIterator it( Remote_View ); | 1080 | QListViewItemIterator it( Remote_View ); |
1081 | for ( ; it.current(); ++it ) { | 1081 | for ( ; it.current(); ++it ) { |
1082 | if ( it.current()->isSelected() ) { | 1082 | if ( it.current()->isSelected() ) { |
1083 | strList << it.current()->text(0); | 1083 | strList << it.current()->text(0); |
1084 | } | 1084 | } |
1085 | } | 1085 | } |
1086 | return strList; | 1086 | return strList; |
1087 | } | 1087 | } |
1088 | return ""; | 1088 | return ""; |
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | void AdvancedFm::homeButtonPushed() { | 1091 | void AdvancedFm::homeButtonPushed() { |
1092 | QString current = QDir::homeDirPath(); | 1092 | QString current = QDir::homeDirPath(); |
1093 | chdir( current.latin1() ); | 1093 | chdir( current.latin1() ); |
1094 | if (TabWidget->currentPageIndex() == 0) { | 1094 | if (TabWidget->currentPageIndex() == 0) { |
1095 | currentDir.cd( current, TRUE); | 1095 | currentDir.cd( current, TRUE); |
1096 | populateLocalView(); | 1096 | populateLocalView(); |
1097 | } else { | 1097 | } else { |
1098 | currentRemoteDir.cd( current, TRUE); | 1098 | currentRemoteDir.cd( current, TRUE); |
1099 | populateRemoteView(); | 1099 | populateRemoteView(); |
1100 | } | 1100 | } |
1101 | update(); | 1101 | update(); |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | void AdvancedFm::docButtonPushed() { | 1104 | void AdvancedFm::docButtonPushed() { |
1105 | QString current = QPEApplication::documentDir(); | 1105 | QString current = QPEApplication::documentDir(); |
1106 | chdir( current.latin1() ); | 1106 | chdir( current.latin1() ); |
1107 | if (TabWidget->currentPageIndex() == 0) { | 1107 | if (TabWidget->currentPageIndex() == 0) { |
1108 | currentDir.cd( current, TRUE); | 1108 | currentDir.cd( current, TRUE); |
1109 | populateLocalView(); | 1109 | populateLocalView(); |
1110 | } else { | 1110 | } else { |
1111 | currentRemoteDir.cd( current, TRUE); | 1111 | currentRemoteDir.cd( current, TRUE); |
1112 | populateRemoteView(); | 1112 | populateRemoteView(); |
1113 | } | 1113 | } |
1114 | update(); | 1114 | update(); |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | void AdvancedFm::SDButtonPushed() { | 1117 | void AdvancedFm::SDButtonPushed() { |
1118 | QString current = "/mnt/card"; | 1118 | QString current = "/mnt/card"; |
1119 | chdir( current.latin1() ); | 1119 | chdir( current.latin1() ); |
1120 | if (TabWidget->currentPageIndex() == 0) { | 1120 | if (TabWidget->currentPageIndex() == 0) { |
1121 | currentDir.cd( current, TRUE); | 1121 | currentDir.cd( current, TRUE); |
1122 | populateLocalView(); | 1122 | populateLocalView(); |
1123 | } else { | 1123 | } else { |
1124 | currentRemoteDir.cd( current, TRUE); | 1124 | currentRemoteDir.cd( current, TRUE); |
1125 | populateRemoteView(); | 1125 | populateRemoteView(); |
1126 | } | 1126 | } |
1127 | update(); | 1127 | update(); |
1128 | 1128 | ||
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | void AdvancedFm::CFButtonPushed() { | 1131 | void AdvancedFm::CFButtonPushed() { |
1132 | QString current = "/mnt/cf"; | 1132 | QString current = "/mnt/cf"; |
1133 | chdir( current.latin1() ); | 1133 | chdir( current.latin1() ); |
1134 | if (TabWidget->currentPageIndex() == 0) { | 1134 | if (TabWidget->currentPageIndex() == 0) { |
1135 | currentDir.cd( current, TRUE); | 1135 | currentDir.cd( current, TRUE); |
1136 | populateLocalView(); | 1136 | populateLocalView(); |
1137 | } else { | 1137 | } else { |
1138 | currentRemoteDir.cd( current, TRUE); | 1138 | currentRemoteDir.cd( current, TRUE); |
1139 | populateRemoteView(); | 1139 | populateRemoteView(); |
1140 | } | 1140 | } |
1141 | update(); | 1141 | update(); |
1142 | 1142 | ||
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | 1145 | ||
1146 | void AdvancedFm::upDir() | 1146 | void AdvancedFm::upDir() |
1147 | { | 1147 | { |
1148 | if (TabWidget->currentPageIndex() == 0) { | 1148 | if (TabWidget->currentPageIndex() == 0) { |
1149 | QString current = currentDir.canonicalPath(); | 1149 | QString current = currentDir.canonicalPath(); |
1150 | QDir dir(current); | 1150 | QDir dir(current); |
1151 | dir.cdUp(); | 1151 | dir.cdUp(); |
1152 | current = dir.canonicalPath(); | 1152 | current = dir.canonicalPath(); |
1153 | chdir( current.latin1() ); | 1153 | chdir( current.latin1() ); |
1154 | currentDir.cd( current, TRUE); | 1154 | currentDir.cd( current, TRUE); |
1155 | populateLocalView(); | 1155 | populateLocalView(); |
1156 | update(); | 1156 | update(); |
1157 | } else { | 1157 | } else { |
1158 | QString current = currentRemoteDir.canonicalPath(); | 1158 | QString current = currentRemoteDir.canonicalPath(); |
1159 | QDir dir(current); | 1159 | QDir dir(current); |
1160 | dir.cdUp(); | 1160 | dir.cdUp(); |
1161 | current = dir.canonicalPath(); | 1161 | current = dir.canonicalPath(); |
1162 | chdir( current.latin1() ); | 1162 | chdir( current.latin1() ); |
1163 | currentRemoteDir.cd( current, TRUE); | 1163 | currentRemoteDir.cd( current, TRUE); |
1164 | populateRemoteView(); | 1164 | populateRemoteView(); |
1165 | update(); | 1165 | update(); |
1166 | } | 1166 | } |
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | void AdvancedFm::copy() | 1169 | void AdvancedFm::copy() |
1170 | { | 1170 | { |
1171 | QStringList curFileList = getPath(); | 1171 | QStringList curFileList = getPath(); |
1172 | if( curFileList.count() > 0) { | 1172 | if( curFileList.count() > 0) { |
1173 | QString curFile; | 1173 | QString curFile; |
1174 | if (TabWidget->currentPageIndex() == 0) { | 1174 | if (TabWidget->currentPageIndex() == 0) { |
1175 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1175 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1176 | 1176 | ||
1177 | QString destFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1177 | QString destFile = currentRemoteDir.canonicalPath()+"/"+(*it); |
1178 | // if(destFile.right(1).find("/",0,TRUE) == -1) | 1178 | // if(destFile.right(1).find("/",0,TRUE) == -1) |
1179 | // destFile+="/"; | 1179 | // destFile+="/"; |
1180 | // destFile +=(*it); | 1180 | // destFile +=(*it); |
1181 | 1181 | ||
1182 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1182 | curFile = currentDir.canonicalPath()+"/"+(*it); |
1183 | // if(curFile.right(1).find("/",0,TRUE) == -1) | 1183 | // if(curFile.right(1).find("/",0,TRUE) == -1) |
1184 | // curFile +="/"; | 1184 | // curFile +="/"; |
1185 | // curFile +=(*it); | 1185 | // curFile +=(*it); |
1186 | 1186 | ||
1187 | QFile f(destFile); | 1187 | QFile f(destFile); |
1188 | if( f.exists()) | 1188 | if( f.exists()) { |
1189 | switch ( QMessageBox::warning(this,tr("Delete"), | ||
1190 | destFile+tr(" already exists\nDo you really want to delete it?"), | ||
1191 | tr("Yes"),tr("No"),0,0,1) ) { | ||
1192 | case 0: | ||
1189 | f.remove(); | 1193 | f.remove(); |
1194 | break; | ||
1195 | case 1: | ||
1196 | return; | ||
1197 | break; | ||
1198 | }; | ||
1199 | } | ||
1190 | if(!copyFile(destFile, curFile) ) { | 1200 | if(!copyFile(destFile, curFile) ) { |
1191 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1201 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); |
1192 | qWarning("nothin doing"); | 1202 | qWarning("nothin doing"); |
1193 | } | 1203 | } |
1194 | } | 1204 | } |
1195 | populateRemoteView(); | 1205 | populateRemoteView(); |
1196 | TabWidget->setCurrentPage(1); | 1206 | TabWidget->setCurrentPage(1); |
1197 | 1207 | ||
1198 | } else { | 1208 | } else { |
1199 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1209 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1200 | 1210 | ||
1201 | QString destFile = currentDir.canonicalPath()+"/"+(*it); | 1211 | QString destFile = currentDir.canonicalPath()+"/"+(*it); |
1202 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1212 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); |
1203 | 1213 | ||
1204 | QFile f(destFile); | 1214 | QFile f(destFile); |
1205 | if( f.exists()) | 1215 | if( f.exists()) { |
1216 | switch ( QMessageBox::warning(this,tr("Delete"), | ||
1217 | destFile+tr(" already exists\nDo you really want to delete it?"), | ||
1218 | tr("Yes"),tr("No"),0,0,1) ) { | ||
1219 | case 0: | ||
1206 | f.remove(); | 1220 | f.remove(); |
1221 | break; | ||
1222 | case 1: | ||
1223 | return; | ||
1224 | break; | ||
1225 | }; | ||
1226 | } | ||
1207 | if(!copyFile(destFile, curFile) ) { | 1227 | if(!copyFile(destFile, curFile) ) { |
1208 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1228 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); |
1209 | 1229 | ||
1210 | qWarning("nothin doing"); | 1230 | qWarning("nothin doing"); |
1211 | } | 1231 | } |
1212 | } | 1232 | } |
1213 | populateLocalView(); | 1233 | populateLocalView(); |
1214 | TabWidget->setCurrentPage(0); | 1234 | TabWidget->setCurrentPage(0); |
1215 | } | 1235 | } |
1216 | } | 1236 | } |
1217 | } | 1237 | } |
1218 | 1238 | ||
1219 | void AdvancedFm::copyAs() | 1239 | void AdvancedFm::copyAs() |
1220 | { | 1240 | { |
1221 | QStringList curFileList = getPath(); | 1241 | QStringList curFileList = getPath(); |
1222 | if( curFileList.count() > 0) { | 1242 | if( curFileList.count() > 0) { |
1223 | QString curFile; | 1243 | QString curFile; |
1224 | InputDialog *fileDlg; | 1244 | InputDialog *fileDlg; |
1225 | fileDlg = new InputDialog(this,tr("Copy As"),TRUE, 0); | 1245 | fileDlg = new InputDialog(this,tr("Copy As"),TRUE, 0); |
1226 | 1246 | ||
1227 | if (TabWidget->currentPageIndex() == 0) { | 1247 | if (TabWidget->currentPageIndex() == 0) { |
1228 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1248 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1229 | QString destFile; | 1249 | QString destFile; |
1230 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1250 | curFile = currentDir.canonicalPath()+"/"+(*it); |
1231 | // InputDialog *fileDlg; | 1251 | // InputDialog *fileDlg; |
1232 | // fileDlg = new InputDialog(this,tr("Copy As"),TRUE, 0); | 1252 | // fileDlg = new InputDialog(this,tr("Copy As"),TRUE, 0); |
1233 | fileDlg->setInputText((const QString &) destFile ); | 1253 | fileDlg->setInputText((const QString &) destFile ); |
1234 | fileDlg->exec(); | 1254 | fileDlg->exec(); |
1235 | if( fileDlg->result() == 1 ) { | 1255 | if( fileDlg->result() == 1 ) { |
1236 | QString filename = fileDlg->LineEdit1->text(); | 1256 | QString filename = fileDlg->LineEdit1->text(); |
1237 | destFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1257 | destFile = currentRemoteDir.canonicalPath()+"/"+(*it); |
1238 | 1258 | ||
1239 | QFile f(destFile); | 1259 | QFile f(destFile); |
1240 | if( f.exists()) | 1260 | if( f.exists()) { |
1241 | f.remove(); | 1261 | switch (QMessageBox::warning(this,tr("Delete"), |
1242 | if(!copyFile(destFile, curFile) ) { | 1262 | destFile+tr(" already exists\nDo you really want to delete it?"), |
1243 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1263 | tr("Yes"),tr("No"),0,0,1) ) { |
1244 | qWarning("nothin doing"); | 1264 | case 0: |
1265 | f.remove(); | ||
1266 | break; | ||
1267 | case 1: | ||
1268 | return; | ||
1269 | break; | ||
1270 | }; | ||
1271 | } | ||
1272 | if(!copyFile(destFile, curFile) ) { | ||
1273 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | ||
1274 | qWarning("nothin doing"); | ||
1275 | } | ||
1245 | } | 1276 | } |
1246 | } | 1277 | } |
1278 | populateRemoteView(); | ||
1279 | TabWidget->setCurrentPage(1); | ||
1280 | } else { | ||
1281 | if (TabWidget->currentPageIndex() == 0) { | ||
1282 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | ||
1283 | |||
1284 | curFile = currentDir.canonicalPath()+"/"+(*it); | ||
1285 | QString destFile; | ||
1286 | fileDlg->setInputText((const QString &) destFile); | ||
1287 | fileDlg->exec(); | ||
1288 | if( fileDlg->result() == 1 ) { | ||
1289 | QString filename = fileDlg->LineEdit1->text(); | ||
1290 | destFile = currentDir.canonicalPath()+"/"+(*it); | ||
1291 | |||
1292 | QFile f(destFile); | ||
1293 | if( f.exists()) { | ||
1294 | switch ( QMessageBox::warning(this,tr("Delete"), | ||
1295 | destFile+tr(" already exists\nDo you really want to delete it?"), | ||
1296 | tr("Yes"),tr("No"),0,0,1) ) { | ||
1297 | case 0: | ||
1298 | f.remove(); | ||
1299 | break; | ||
1300 | case 1: | ||
1301 | return; | ||
1302 | break; | ||
1303 | }; | ||
1304 | } | ||
1305 | if(!copyFile(destFile, curFile) ) { | ||
1306 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | ||
1307 | qWarning("nothin doing"); | ||
1308 | } | ||
1309 | |||
1310 | } | ||
1311 | } | ||
1312 | populateLocalView(); | ||
1313 | TabWidget->setCurrentPage(0); | ||
1314 | } | ||
1247 | } | 1315 | } |
1316 | } | ||
1317 | |||
1318 | } | ||
1319 | |||
1320 | void AdvancedFm::copySameDir() { | ||
1321 | QStringList curFileList = getPath(); | ||
1322 | if( curFileList.count() > 0) { | ||
1323 | QString curFile; | ||
1324 | InputDialog *fileDlg; | ||
1248 | 1325 | ||
1249 | populateRemoteView(); | ||
1250 | TabWidget->setCurrentPage(1); | ||
1251 | } else { | ||
1252 | if (TabWidget->currentPageIndex() == 0) { | 1326 | if (TabWidget->currentPageIndex() == 0) { |
1253 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1327 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1254 | |||
1255 | curFile = currentDir.canonicalPath()+"/"+(*it); | ||
1256 | QString destFile; | 1328 | QString destFile; |
1257 | fileDlg->setInputText((const QString &) destFile); | 1329 | curFile = currentDir.canonicalPath()+"/"+(*it); |
1330 | fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); | ||
1331 | // InputDialog *fileDlg; | ||
1332 | // fileDlg = new InputDialog(this,tr("Copy As"),TRUE, 0); | ||
1333 | fileDlg->setInputText((const QString &) destFile ); | ||
1258 | fileDlg->exec(); | 1334 | fileDlg->exec(); |
1259 | if( fileDlg->result() == 1 ) { | 1335 | if( fileDlg->result() == 1 ) { |
1260 | QString filename = fileDlg->LineEdit1->text(); | 1336 | QString filename = fileDlg->LineEdit1->text(); |
1261 | destFile = currentDir.canonicalPath()+"/"+(*it); | 1337 | destFile = currentDir.canonicalPath()+"/"+filename; |
1262 | 1338 | ||
1263 | QFile f(destFile); | 1339 | QFile f(destFile); |
1264 | if( f.exists()) | 1340 | if( f.exists()) { |
1265 | f.remove(); | 1341 | switch (QMessageBox::warning(this,tr("Delete"), |
1342 | destFile+tr(" already exists\nDo you really want to delete it?"), | ||
1343 | tr("Yes"),tr("No"),0,0,1) ) { | ||
1344 | case 0: | ||
1345 | qDebug(""); | ||
1346 | f.remove(); | ||
1347 | break; | ||
1348 | case 1: | ||
1349 | return; | ||
1350 | break; | ||
1351 | }; | ||
1352 | } | ||
1266 | if(!copyFile(destFile, curFile) ) { | 1353 | if(!copyFile(destFile, curFile) ) { |
1267 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1354 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); |
1268 | qWarning("nothin doing"); | 1355 | qWarning("nothin doing"); |
1269 | } | 1356 | } |
1357 | |||
1358 | qDebug("copy "+curFile+" as "+destFile); | ||
1270 | } | 1359 | } |
1360 | delete fileDlg; | ||
1361 | } | ||
1362 | populateRemoteView(); | ||
1363 | TabWidget->setCurrentPage(1); | ||
1364 | } else { | ||
1365 | if (TabWidget->currentPageIndex() == 0) { | ||
1366 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | ||
1367 | |||
1368 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | ||
1369 | fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); | ||
1370 | QString destFile; | ||
1371 | fileDlg->setInputText((const QString &) destFile); | ||
1372 | fileDlg->exec(); | ||
1373 | if( fileDlg->result() == 1 ) { | ||
1374 | QString filename = fileDlg->LineEdit1->text(); | ||
1375 | destFile = currentDir.canonicalPath()+"/"+filename; | ||
1376 | |||
1377 | QFile f(destFile); | ||
1378 | if( f.exists()) { | ||
1379 | switch ( QMessageBox::warning(this,tr("Delete"), | ||
1380 | destFile+tr(" already exists\nDo you really want to delete it?"), | ||
1381 | tr("Yes"),tr("No"),0,0,1) ) { | ||
1382 | case 0: | ||
1383 | f.remove(); | ||
1384 | break; | ||
1385 | case 1: | ||
1386 | return; | ||
1387 | break; | ||
1388 | }; | ||
1389 | } | ||
1390 | if(!copyFile(destFile, curFile) ) { | ||
1391 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | ||
1392 | qWarning("nothin doing"); | ||
1393 | } | ||
1394 | qDebug("copy "+curFile+" as "+destFile); | ||
1395 | } | ||
1396 | delete fileDlg; | ||
1397 | } | ||
1398 | populateLocalView(); | ||
1399 | TabWidget->setCurrentPage(0); | ||
1271 | } | 1400 | } |
1272 | populateLocalView(); | ||
1273 | TabWidget->setCurrentPage(0); | ||
1274 | } | 1401 | } |
1275 | } | 1402 | } |
1276 | } | ||
1277 | } | ||
1278 | 1403 | ||
1404 | } | ||
1405 | |||
1279 | void AdvancedFm::move() { | 1406 | void AdvancedFm::move() { |
1280 | 1407 | ||
1281 | QStringList curFileList = getPath(); | 1408 | QStringList curFileList = getPath(); |
1282 | if( curFileList.count() > 0) { | 1409 | if( curFileList.count() > 0) { |
1283 | QString curFile; | 1410 | QString curFile; |
1284 | // qDebug(curFile); | 1411 | // qDebug(curFile); |
1285 | QString destFile; | 1412 | QString destFile; |
1286 | 1413 | ||
1287 | if (TabWidget->currentPageIndex() == 0) { | 1414 | if (TabWidget->currentPageIndex() == 0) { |
1288 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1415 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1289 | QString destFile = currentRemoteDir.canonicalPath(); | 1416 | QString destFile = currentRemoteDir.canonicalPath(); |
1290 | if(destFile.right(1).find("/",0,TRUE) == -1) | 1417 | if(destFile.right(1).find("/",0,TRUE) == -1) |
1291 | destFile+="/"; | 1418 | destFile+="/"; |
1292 | destFile +=(*it); | 1419 | destFile +=(*it); |
1293 | curFile = currentDir.canonicalPath(); | 1420 | curFile = currentDir.canonicalPath(); |
1294 | qDebug("Destination file is "+destFile); | 1421 | qDebug("Destination file is "+destFile); |
1295 | if(curFile.right(1).find("/",0,TRUE) == -1) | 1422 | if(curFile.right(1).find("/",0,TRUE) == -1) |
1296 | curFile +="/"; | 1423 | curFile +="/"; |
1297 | curFile+=(*it); | 1424 | curFile+=(*it); |
1298 | 1425 | ||
1299 | QFile f(destFile); | 1426 | QFile f(destFile); |
1300 | if( f.exists()) | 1427 | if( f.exists()) { |
1301 | f.remove(); | 1428 | switch (QMessageBox::warning(this,tr("Delete"), |
1302 | if(!copyFile( destFile, curFile) ) { | 1429 | destFile+tr(" already exists\nDo you really want to delete it?"), |
1303 | QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); | 1430 | tr("Yes"),tr("No"),0,0,1) ) { |
1304 | return; | 1431 | case 0: |
1432 | f.remove(); | ||
1433 | break; | ||
1434 | case 1: | ||
1435 | return; | ||
1436 | break; | ||
1437 | }; | ||
1438 | if(!copyFile( destFile, curFile) ) { | ||
1439 | QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); | ||
1440 | return; | ||
1441 | } | ||
1442 | QFile::remove(curFile); | ||
1443 | } | ||
1305 | } | 1444 | } |
1306 | QFile::remove(curFile); | 1445 | TabWidget->setCurrentPage(1); |
1307 | } | 1446 | } else { |
1308 | TabWidget->setCurrentPage(1); | 1447 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1309 | } else { | 1448 | QString destFile = currentRemoteDir.canonicalPath(); |
1310 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | ||
1311 | QString destFile = currentRemoteDir.canonicalPath(); | ||
1312 | if(destFile.right(1).find("/",0,TRUE) == -1) | 1449 | if(destFile.right(1).find("/",0,TRUE) == -1) |
1313 | destFile+="/"; | 1450 | destFile+="/"; |
1314 | destFile +=(*it); | 1451 | destFile +=(*it); |
1315 | qDebug("Destination file is "+destFile); | 1452 | qDebug("Destination file is "+destFile); |
1316 | curFile = currentDir.canonicalPath(); | 1453 | curFile = currentDir.canonicalPath(); |
1317 | if(curFile.right(1).find("/",0,TRUE) == -1) | 1454 | if(curFile.right(1).find("/",0,TRUE) == -1) |
1318 | curFile +="/"; | 1455 | curFile +="/"; |
1319 | curFile+=(*it); | 1456 | curFile+=(*it); |
1320 | 1457 | ||
1321 | QFile f(destFile); | 1458 | QFile f(destFile); |
1322 | if( f.exists()) | 1459 | if( f.exists()) { |
1323 | f.remove(); | 1460 | switch (QMessageBox::warning(this,tr("Delete"), |
1324 | if(!copyFile(destFile, curFile) ) { | 1461 | destFile+tr(" already exists\nDo you really want to delete it?"), |
1325 | QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); | 1462 | tr("Yes"),tr("No"),0,0,1) ) { |
1326 | return; | 1463 | case 0: |
1464 | f.remove(); | ||
1465 | break; | ||
1466 | case 1: | ||
1467 | return; | ||
1468 | break; | ||
1469 | }; | ||
1470 | if(!copyFile(destFile, curFile) ) { | ||
1471 | QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); | ||
1472 | return; | ||
1473 | } | ||
1474 | } | ||
1475 | QFile::remove(curFile); | ||
1476 | TabWidget->setCurrentPage(0); | ||
1477 | } | ||
1327 | } | 1478 | } |
1328 | QFile::remove(curFile); | 1479 | populateRemoteView(); |
1329 | TabWidget->setCurrentPage(0); | 1480 | populateLocalView(); |
1330 | } | 1481 | } |
1331 | } | ||
1332 | populateRemoteView(); | ||
1333 | populateLocalView(); | ||
1334 | } | 1482 | } |
1335 | } | ||
1336 | 1483 | ||
1337 | bool AdvancedFm::copyFile( const QString & dest, const QString & src ) | 1484 | bool AdvancedFm::copyFile( const QString & dest, const QString & src ) |
1338 | { | 1485 | { |
1339 | char bf[ 50000 ]; | 1486 | char bf[ 50000 ]; |
1340 | int bytesRead; | 1487 | int bytesRead; |
1341 | bool success = TRUE; | 1488 | bool success = TRUE; |
1342 | struct stat status; | 1489 | struct stat status; |
1343 | 1490 | ||
1344 | QFile s( src ); | 1491 | QFile s( src ); |
1345 | QFile d( dest ); | 1492 | QFile d( dest ); |
1346 | 1493 | ||
1347 | if( s.open( IO_ReadOnly | IO_Raw ) && d.open( IO_WriteOnly | IO_Raw ) ) { | 1494 | if( s.open( IO_ReadOnly | IO_Raw ) && d.open( IO_WriteOnly | IO_Raw ) ) { |
1348 | while( (bytesRead = s.readBlock( bf, sizeof( bf ) )) == sizeof( bf ) ) { | 1495 | while( (bytesRead = s.readBlock( bf, sizeof( bf ) )) == sizeof( bf ) ) { |
1349 | if( d.writeBlock( bf, sizeof( bf ) ) != sizeof( bf ) ){ | 1496 | if( d.writeBlock( bf, sizeof( bf ) ) != sizeof( bf ) ){ |
1350 | success = FALSE; | 1497 | success = FALSE; |
1351 | break; | 1498 | break; |
1352 | } | 1499 | } |
1353 | } | 1500 | } |
1354 | if( success && (bytesRead > 0) ){ | 1501 | if( success && (bytesRead > 0) ){ |
1355 | d.writeBlock( bf, bytesRead ); | 1502 | d.writeBlock( bf, bytesRead ); |
1356 | } | 1503 | } |
1357 | } else { | 1504 | } else { |
1358 | success = FALSE; | 1505 | success = FALSE; |
1359 | } | 1506 | } |
1360 | 1507 | ||
1361 | // Set file permissions | 1508 | // Set file permissions |
1362 | if( stat( (const char *) src, &status ) == 0 ){ | 1509 | if( stat( (const char *) src, &status ) == 0 ){ |
1363 | chmod( (const char *) dest, status.st_mode ); | 1510 | chmod( (const char *) dest, status.st_mode ); |
1364 | } | 1511 | } |
1365 | 1512 | ||
1366 | return success; | 1513 | return success; |
1367 | } | 1514 | } |
1368 | 1515 | ||
1369 | void AdvancedFm::runCommand() { | 1516 | void AdvancedFm::runCommand() { |
1370 | QString curFile; | 1517 | QString curFile; |
1371 | if (TabWidget->currentPageIndex() == 0) { | 1518 | if (TabWidget->currentPageIndex() == 0) { |
1372 | if( Local_View->currentItem()) | 1519 | if( Local_View->currentItem()) |
1373 | curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0); | 1520 | curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0); |
1374 | } else { | 1521 | } else { |
1375 | if(Remote_View->currentItem()) | 1522 | if(Remote_View->currentItem()) |
1376 | curFile = currentRemoteDir.canonicalPath() + "/"+Remote_View->currentItem()->text(0); | 1523 | curFile = currentRemoteDir.canonicalPath() + "/"+Remote_View->currentItem()->text(0); |
1377 | } | 1524 | } |
1378 | 1525 | ||
1379 | InputDialog *fileDlg; | 1526 | InputDialog *fileDlg; |
1380 | fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); | 1527 | fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); |
1381 | fileDlg->setInputText(curFile); | 1528 | fileDlg->setInputText(curFile); |
1382 | fileDlg->exec(); | 1529 | fileDlg->exec(); |
1383 | QString command; | 1530 | QString command; |
1384 | if( fileDlg->result() == 1 ) { | 1531 | if( fileDlg->result() == 1 ) { |
1385 | command = fileDlg->LineEdit1->text(); | 1532 | command = fileDlg->LineEdit1->text(); |
1386 | 1533 | ||
1387 | // int err=0; | 1534 | // int err=0; |
1388 | Output *outDlg; | 1535 | Output *outDlg; |
1389 | outDlg = new Output(this, tr("AdvancedFm Output"),FALSE); | 1536 | outDlg = new Output(this, tr("AdvancedFm Output"),FALSE); |
1390 | outDlg->showMaximized(); | 1537 | outDlg->showMaximized(); |
1391 | outDlg->show(); | 1538 | outDlg->show(); |
1392 | qApp->processEvents(); | 1539 | qApp->processEvents(); |
1393 | FILE *fp; | 1540 | FILE *fp; |
1394 | char line[130]; | 1541 | char line[130]; |
1395 | sleep(1); | 1542 | sleep(1); |
1396 | // if(command.find("2>",0,TRUE) != -1) | 1543 | // if(command.find("2>",0,TRUE) != -1) |
1397 | command +=" 2>&1"; | 1544 | command +=" 2>&1"; |
1398 | fp = popen( (const char *) command, "r"); | 1545 | fp = popen( (const char *) command, "r"); |
1399 | if ( !fp ) { | 1546 | if ( !fp ) { |
1400 | qDebug("Could not execute '" + command + "'! err=%d", fp); | 1547 | qDebug("Could not execute '" + command + "'! err=%d", fp); |
1401 | QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); | 1548 | QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); |
1402 | pclose(fp); | 1549 | pclose(fp); |
1403 | return; | 1550 | return; |
1404 | } else { | 1551 | } else { |
1405 | while ( fgets( line, sizeof line, fp)) { | 1552 | while ( fgets( line, sizeof line, fp)) { |
1406 | QString lineStr = line; | 1553 | QString lineStr = line; |
1407 | lineStr=lineStr.left(lineStr.length()-1); | 1554 | lineStr=lineStr.left(lineStr.length()-1); |
1408 | outDlg->OutputEdit->append(lineStr); | 1555 | outDlg->OutputEdit->append(lineStr); |
1409 | outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); | 1556 | outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); |
1410 | } | 1557 | } |
1411 | } | 1558 | } |
1412 | } | 1559 | } |
1413 | } | 1560 | } |
1414 | 1561 | ||
1415 | void AdvancedFm::runCommandStd() { | 1562 | void AdvancedFm::runCommandStd() { |
1416 | QString curFile; | 1563 | QString curFile; |
1417 | if (TabWidget->currentPageIndex() == 0) { | 1564 | if (TabWidget->currentPageIndex() == 0) { |
1418 | if( Local_View->currentItem()) | 1565 | if( Local_View->currentItem()) |
1419 | curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0); | 1566 | curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0); |
1420 | } else { | 1567 | } else { |
1421 | if(Remote_View->currentItem()) | 1568 | if(Remote_View->currentItem()) |
1422 | curFile = currentRemoteDir.canonicalPath() +"/"+ Remote_View->currentItem()->text(0); | 1569 | curFile = currentRemoteDir.canonicalPath() +"/"+ Remote_View->currentItem()->text(0); |
1423 | } | 1570 | } |
1424 | 1571 | ||
1425 | InputDialog *fileDlg; | 1572 | InputDialog *fileDlg; |
1426 | fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); | 1573 | fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); |
1427 | fileDlg->setInputText(curFile); | 1574 | fileDlg->setInputText(curFile); |
1428 | fileDlg->exec(); | 1575 | fileDlg->exec(); |
1429 | QString command; | 1576 | QString command; |
1430 | if( fileDlg->result() == 1 ) { | 1577 | if( fileDlg->result() == 1 ) { |
1431 | qApp->processEvents(); | 1578 | qApp->processEvents(); |
1432 | command = fileDlg->LineEdit1->text() + " &"; | 1579 | command = fileDlg->LineEdit1->text() + " &"; |
1433 | system(command.latin1()); | 1580 | system(command.latin1()); |
1434 | } | 1581 | } |
1435 | } | 1582 | } |
1436 | 1583 | ||
1437 | void AdvancedFm::fileStatus() { | 1584 | void AdvancedFm::fileStatus() { |
1438 | QString curFile; | 1585 | QString curFile; |
1439 | if (TabWidget->currentPageIndex() == 0) { | 1586 | if (TabWidget->currentPageIndex() == 0) { |
1440 | curFile = Local_View->currentItem()->text(0); | 1587 | curFile = Local_View->currentItem()->text(0); |
1441 | } else { | 1588 | } else { |
1442 | curFile = Remote_View->currentItem()->text(0); | 1589 | curFile = Remote_View->currentItem()->text(0); |
1443 | } | 1590 | } |
1444 | QString command = " stat -l "+ curFile +" 2>&1"; | 1591 | QString command = " stat -l "+ curFile +" 2>&1"; |
1445 | // int err=0; | 1592 | // int err=0; |
1446 | Output *outDlg; | 1593 | Output *outDlg; |
1447 | outDlg = new Output(this, tr("AdvancedFm Output"),FALSE); | 1594 | outDlg = new Output(this, tr("AdvancedFm Output"),FALSE); |
1448 | outDlg->showMaximized(); | 1595 | outDlg->showMaximized(); |
1449 | outDlg->show(); | 1596 | outDlg->show(); |
1450 | qApp->processEvents(); | 1597 | qApp->processEvents(); |
1451 | FILE *fp; | 1598 | FILE *fp; |
1452 | char line[130]; | 1599 | char line[130]; |
1453 | sleep(1); | 1600 | sleep(1); |
1454 | fp = popen( (const char *) command, "r"); | 1601 | fp = popen( (const char *) command, "r"); |
1455 | if ( !fp ) { | 1602 | if ( !fp ) { |
1456 | qDebug("Could not execute '" + command + "'! err=%d", fp); | 1603 | qDebug("Could not execute '" + command + "'! err=%d", fp); |
1457 | QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); | 1604 | QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); |
1458 | pclose(fp); | 1605 | pclose(fp); |
1459 | return; | 1606 | return; |
1460 | } else { | 1607 | } else { |
1461 | while ( fgets( line, sizeof line, fp)) { | 1608 | while ( fgets( line, sizeof line, fp)) { |
1462 | outDlg->OutputEdit->append(line); | 1609 | outDlg->OutputEdit->append(line); |
1463 | outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); | 1610 | outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); |
@@ -1630,170 +1777,171 @@ void AdvancedFm::parsetab(const QString &fileName) { | |||
1630 | & filesystemType.find("cramfs",0,TRUE) == -1 | 1777 | & filesystemType.find("cramfs",0,TRUE) == -1 |
1631 | & filesystemType.find("auto",0,TRUE) == -1) | 1778 | & filesystemType.find("auto",0,TRUE) == -1) |
1632 | fsList << filesystemType; | 1779 | fsList << filesystemType; |
1633 | // deviceList << deviceName; | 1780 | // deviceList << deviceName; |
1634 | // qDebug(mountDir+"::"+filesystemType); | 1781 | // qDebug(mountDir+"::"+filesystemType); |
1635 | fileSystemTypeList << mountDir+"::"+filesystemType; | 1782 | fileSystemTypeList << mountDir+"::"+filesystemType; |
1636 | } | 1783 | } |
1637 | } | 1784 | } |
1638 | } | 1785 | } |
1639 | endmntent( mntfp ); | 1786 | endmntent( mntfp ); |
1640 | } | 1787 | } |
1641 | 1788 | ||
1642 | QString AdvancedFm::getFileSystemType(const QString ¤tText) { | 1789 | QString AdvancedFm::getFileSystemType(const QString ¤tText) { |
1643 | parsetab("/etc/mtab"); //why did TT forget filesystem type? | 1790 | parsetab("/etc/mtab"); //why did TT forget filesystem type? |
1644 | QString current = currentText;//.right( currentText.length()-1); | 1791 | QString current = currentText;//.right( currentText.length()-1); |
1645 | QString baseFs; | 1792 | QString baseFs; |
1646 | for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) { | 1793 | for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) { |
1647 | QString temp = (*it); | 1794 | QString temp = (*it); |
1648 | QString path = temp.left(temp.find("::",0,TRUE) ); | 1795 | QString path = temp.left(temp.find("::",0,TRUE) ); |
1649 | path = path.right( path.length()-1); | 1796 | path = path.right( path.length()-1); |
1650 | if(path.isEmpty()) baseFs = temp.right( temp.length() - temp.find("::",0,TRUE) - 2); | 1797 | if(path.isEmpty()) baseFs = temp.right( temp.length() - temp.find("::",0,TRUE) - 2); |
1651 | if( current.find( path,0,TRUE) != -1 && !path.isEmpty()) { | 1798 | if( current.find( path,0,TRUE) != -1 && !path.isEmpty()) { |
1652 | return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); | 1799 | return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); |
1653 | } | 1800 | } |
1654 | } | 1801 | } |
1655 | return baseFs; | 1802 | return baseFs; |
1656 | } | 1803 | } |
1657 | 1804 | ||
1658 | 1805 | ||
1659 | void AdvancedFm::doBeam() { | 1806 | void AdvancedFm::doBeam() { |
1660 | Ir ir; | 1807 | Ir ir; |
1661 | if(!ir.supported()){ | 1808 | if(!ir.supported()){ |
1662 | } else { | 1809 | } else { |
1663 | 1810 | ||
1664 | QStringList curFileList = getPath(); | 1811 | QStringList curFileList = getPath(); |
1665 | if( curFileList.count() > 0) { | 1812 | if( curFileList.count() > 0) { |
1666 | 1813 | ||
1667 | if (TabWidget->currentPageIndex() == 0) { | 1814 | if (TabWidget->currentPageIndex() == 0) { |
1668 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1815 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1669 | 1816 | ||
1670 | QString curFile = currentDir.canonicalPath()+"/"+(*it); | 1817 | QString curFile = currentDir.canonicalPath()+"/"+(*it); |
1671 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); | 1818 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); |
1672 | Ir *file = new Ir(this, "IR"); | 1819 | Ir *file = new Ir(this, "IR"); |
1673 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); | 1820 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); |
1674 | file->send( curFile, curFile ); | 1821 | file->send( curFile, curFile ); |
1675 | } | 1822 | } |
1676 | 1823 | ||
1677 | } else { | 1824 | } else { |
1678 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1825 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1679 | 1826 | ||
1680 | QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1827 | QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it); |
1681 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); | 1828 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); |
1682 | Ir *file = new Ir(this, "IR"); | 1829 | Ir *file = new Ir(this, "IR"); |
1683 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); | 1830 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); |
1684 | file->send( curFile, curFile ); | 1831 | file->send( curFile, curFile ); |
1685 | 1832 | ||
1686 | } | 1833 | } |
1687 | } | 1834 | } |
1688 | } | 1835 | } |
1689 | } | 1836 | } |
1690 | 1837 | ||
1691 | } | 1838 | } |
1692 | 1839 | ||
1693 | void AdvancedFm::fileBeamFinished( Ir *ir) { | 1840 | void AdvancedFm::fileBeamFinished( Ir *ir) { |
1694 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); | 1841 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); |
1695 | 1842 | ||
1696 | } | 1843 | } |
1697 | 1844 | ||
1698 | 1845 | ||
1699 | // QList<QListViewItem> * getSelectedItems( QListView * Local_View ); | 1846 | // QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |
1700 | // QListViewItemIterator it( Local_View ); | 1847 | // QListViewItemIterator it( Local_View ); |
1701 | // for ( ; it.current(); ++it ) { | 1848 | // for ( ; it.current(); ++it ) { |
1702 | // if ( it.current()->isSelected() ) { | 1849 | // if ( it.current()->isSelected() ) { |
1703 | // QString strItem = it.current()->text(0); | 1850 | // QString strItem = it.current()->text(0); |
1704 | // QString localFile = currentDir.canonicalPath()+"/"+strItem; | 1851 | // QString localFile = currentDir.canonicalPath()+"/"+strItem; |
1705 | // QFileInfo fi(localFile); | 1852 | // QFileInfo fi(localFile); |
1706 | // } | 1853 | // } |
1707 | // } | 1854 | // } |
1708 | 1855 | ||
1709 | void AdvancedFm::showFileMenu() { | 1856 | void AdvancedFm::showFileMenu() { |
1710 | 1857 | ||
1711 | QString curApp; | 1858 | QString curApp; |
1712 | bool isLocalView = false; | 1859 | bool isLocalView = false; |
1713 | if (TabWidget->currentPageIndex() == 0) { | 1860 | if (TabWidget->currentPageIndex() == 0) { |
1714 | isLocalView = TRUE; | 1861 | isLocalView = TRUE; |
1715 | curApp = Local_View->currentItem()->text(0); | 1862 | curApp = Local_View->currentItem()->text(0); |
1716 | } else { | 1863 | } else { |
1717 | curApp = Remote_View->currentItem()->text(0); | 1864 | curApp = Remote_View->currentItem()->text(0); |
1718 | } | 1865 | } |
1719 | 1866 | ||
1720 | MimeType mt( curApp ); | 1867 | MimeType mt( curApp ); |
1721 | const AppLnk* app = mt.application(); | 1868 | const AppLnk* app = mt.application(); |
1722 | QFile fi(curApp); | 1869 | QFile fi(curApp); |
1723 | 1870 | ||
1724 | // QPopupMenu m; | 1871 | // QPopupMenu m; |
1725 | QPopupMenu *m = new QPopupMenu(0); | 1872 | QPopupMenu *m = new QPopupMenu(0); |
1726 | 1873 | ||
1727 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 1874 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
1728 | m->insertSeparator(); | 1875 | m->insertSeparator(); |
1729 | if ( QFileInfo(fi).isDir() ) { | 1876 | if ( QFileInfo(fi).isDir() ) { |
1730 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | 1877 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); |
1731 | } else { | 1878 | } else { |
1732 | 1879 | ||
1733 | if ( app ) | 1880 | if ( app ) |
1734 | m->insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) ); | 1881 | m->insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) ); |
1735 | else if( QFileInfo(fi).isExecutable() ) | 1882 | else if( QFileInfo(fi).isExecutable() ) |
1736 | m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) ); | 1883 | m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) ); |
1737 | 1884 | ||
1738 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); | 1885 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); |
1739 | } | 1886 | } |
1740 | m->insertSeparator(); | 1887 | m->insertSeparator(); |
1741 | 1888 | ||
1742 | 1889 | ||
1743 | if(isLocalView) | 1890 | if(isLocalView) |
1744 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 1891 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
1745 | else | 1892 | else |
1746 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 1893 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
1747 | 1894 | ||
1748 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 1895 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
1749 | m->insertSeparator(); | 1896 | m->insertSeparator(); |
1750 | 1897 | ||
1751 | if(isLocalView) | 1898 | if(isLocalView) |
1752 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 1899 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
1753 | else | 1900 | else |
1754 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 1901 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
1755 | 1902 | ||
1756 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); | 1903 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); |
1757 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 1904 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); |
1905 | m->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); | ||
1758 | m->insertItem( tr( "Move" ), this, SLOT( move() )); | 1906 | m->insertItem( tr( "Move" ), this, SLOT( move() )); |
1759 | m->insertSeparator(); | 1907 | m->insertSeparator(); |
1760 | 1908 | ||
1761 | if(isLocalView) | 1909 | if(isLocalView) |
1762 | m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); | 1910 | m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); |
1763 | else | 1911 | else |
1764 | m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); | 1912 | m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); |
1765 | 1913 | ||
1766 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); | 1914 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); |
1767 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); | 1915 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); |
1768 | m->insertSeparator(); | 1916 | m->insertSeparator(); |
1769 | 1917 | ||
1770 | if(isLocalView) | 1918 | if(isLocalView) |
1771 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 1919 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
1772 | else | 1920 | else |
1773 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 1921 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
1774 | 1922 | ||
1775 | m->insertSeparator(); | 1923 | m->insertSeparator(); |
1776 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); | 1924 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); |
1777 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings | 1925 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings |
1778 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | 1926 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); |
1779 | m->setCheckable(TRUE); | 1927 | m->setCheckable(TRUE); |
1780 | if (!b) | 1928 | if (!b) |
1781 | m->setItemChecked(m->idAt(0),TRUE); | 1929 | m->setItemChecked(m->idAt(0),TRUE); |
1782 | else | 1930 | else |
1783 | m->setItemChecked(m->idAt(0),FALSE); | 1931 | m->setItemChecked(m->idAt(0),FALSE); |
1784 | if(Ir::supported()) | 1932 | if(Ir::supported()) |
1785 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | 1933 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); |
1786 | m->setFocus(); | 1934 | m->setFocus(); |
1787 | m->exec( QCursor::pos() ); | 1935 | m->exec( QCursor::pos() ); |
1788 | sleep(1); | 1936 | sleep(1); |
1789 | if(m) delete m; | 1937 | if(m) delete m; |
1790 | } | 1938 | } |
1791 | 1939 | ||
1792 | 1940 | ||
1793 | void AdvancedFm::cancelMenuTimer() | 1941 | void AdvancedFm::cancelMenuTimer() |
1794 | { | 1942 | { |
1795 | 1943 | ||
1796 | qDebug("selectionChanged: cancel menu timer"); | 1944 | qDebug("selectionChanged: cancel menu timer"); |
1797 | if( menuTimer.isActive() ) | 1945 | if( menuTimer.isActive() ) |
1798 | menuTimer.stop(); | 1946 | menuTimer.stop(); |
1799 | } | 1947 | } |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 7335773..7665fe9 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -1,139 +1,140 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | opieftp.h | 2 | opieftp.h |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #ifndef ADVANCEDFM_H | 12 | #ifndef ADVANCEDFM_H |
13 | #define ADVANCEDFM_H | 13 | #define ADVANCEDFM_H |
14 | 14 | ||
15 | #include <qpe/ir.h> | 15 | #include <qpe/ir.h> |
16 | 16 | ||
17 | #include <qvariant.h> | 17 | #include <qvariant.h> |
18 | #include <qdialog.h> | 18 | #include <qdialog.h> |
19 | #include <qmainwindow.h> | 19 | #include <qmainwindow.h> |
20 | #include <qstringlist.h> | 20 | #include <qstringlist.h> |
21 | #include <qdir.h> | 21 | #include <qdir.h> |
22 | #include <qstring.h> | 22 | #include <qstring.h> |
23 | #include <qpoint.h> | 23 | #include <qpoint.h> |
24 | #include <qtimer.h> | 24 | #include <qtimer.h> |
25 | 25 | ||
26 | class QVBoxLayout; | 26 | class QVBoxLayout; |
27 | class QHBoxLayout; | 27 | class QHBoxLayout; |
28 | class QGridLayout; | 28 | class QGridLayout; |
29 | class QComboBox; | 29 | class QComboBox; |
30 | class QListView; | 30 | class QListView; |
31 | class QListviewItem; | 31 | class QListviewItem; |
32 | class QLabel; | 32 | class QLabel; |
33 | class QProgressBar; | 33 | class QProgressBar; |
34 | class QSpinBox; | 34 | class QSpinBox; |
35 | class QTabWidget; | 35 | class QTabWidget; |
36 | class QWidget; | 36 | class QWidget; |
37 | class QPEToolBar; | 37 | class QPEToolBar; |
38 | class QPEMenuBar; | 38 | class QPEMenuBar; |
39 | class QPopupMenu; | 39 | class QPopupMenu; |
40 | class QFile; | 40 | class QFile; |
41 | class QListViewItem; | 41 | class QListViewItem; |
42 | class QLineEdit; | 42 | class QLineEdit; |
43 | //class QPushButton; | 43 | //class QPushButton; |
44 | class QToolButton; | 44 | class QToolButton; |
45 | class Ir; | 45 | class Ir; |
46 | 46 | ||
47 | class AdvancedFm : public QMainWindow | 47 | class AdvancedFm : public QMainWindow |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | AdvancedFm(); | 51 | AdvancedFm(); |
52 | ~AdvancedFm(); | 52 | ~AdvancedFm(); |
53 | 53 | ||
54 | QTabWidget *TabWidget; | 54 | QTabWidget *TabWidget; |
55 | QWidget *tab, *tab_2, *tab_3; | 55 | QWidget *tab, *tab_2, *tab_3; |
56 | QListView *Local_View, *Remote_View; | 56 | QListView *Local_View, *Remote_View; |
57 | 57 | ||
58 | QLineEdit *currentPathEdit; | 58 | QLineEdit *currentPathEdit; |
59 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu; | 59 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu; |
60 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 60 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
61 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 61 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
62 | QDir currentDir, currentRemoteDir; | 62 | QDir currentDir, currentRemoteDir; |
63 | QComboBox *currentPathCombo; | 63 | QComboBox *currentPathCombo; |
64 | QString filterStr; | 64 | QString filterStr; |
65 | QListViewItem * item; | 65 | QListViewItem * item; |
66 | bool b; | 66 | bool b; |
67 | QStringList fileSystemTypeList, fsList; | 67 | QStringList fileSystemTypeList, fsList; |
68 | int currentServerConfig; | 68 | int currentServerConfig; |
69 | protected slots: | 69 | protected slots: |
70 | void doLocalCd(); | 70 | void doLocalCd(); |
71 | void doRemoteCd(); | 71 | void doRemoteCd(); |
72 | // void copy(); | 72 | // void copy(); |
73 | void mkDir(); | 73 | void mkDir(); |
74 | void del(); | 74 | void del(); |
75 | void rn(); | 75 | void rn(); |
76 | void populateLocalView(); | 76 | void populateLocalView(); |
77 | void populateRemoteView(); | 77 | void populateRemoteView(); |
78 | void showHidden(); | 78 | void showHidden(); |
79 | void showRemoteHidden(); | 79 | void showRemoteHidden(); |
80 | void writeConfig(); | 80 | void writeConfig(); |
81 | void readConfig(); | 81 | void readConfig(); |
82 | void localListClicked(QListViewItem *); | 82 | void localListClicked(QListViewItem *); |
83 | void remoteListClicked(QListViewItem *); | 83 | void remoteListClicked(QListViewItem *); |
84 | void localListPressed( int, QListViewItem *, const QPoint&, int); | 84 | void localListPressed( int, QListViewItem *, const QPoint&, int); |
85 | void remoteListPressed( int, QListViewItem *, const QPoint&, int); | 85 | void remoteListPressed( int, QListViewItem *, const QPoint&, int); |
86 | void localMakDir(); | 86 | void localMakDir(); |
87 | void localDelete(); | 87 | void localDelete(); |
88 | void remoteMakDir(); | 88 | void remoteMakDir(); |
89 | void remoteDelete(); | 89 | void remoteDelete(); |
90 | /* bool remoteDirList(const QString &); */ | 90 | /* bool remoteDirList(const QString &); */ |
91 | /* bool remoteChDir(const QString &); */ | 91 | /* bool remoteChDir(const QString &); */ |
92 | void tabChanged(QWidget*); | 92 | void tabChanged(QWidget*); |
93 | void cleanUp(); | 93 | void cleanUp(); |
94 | void remoteRename(); | 94 | void remoteRename(); |
95 | void localRename(); | 95 | void localRename(); |
96 | void runThis(); | 96 | void runThis(); |
97 | void runText(); | 97 | void runText(); |
98 | void filePerms(); | 98 | void filePerms(); |
99 | void doProperties(); | 99 | void doProperties(); |
100 | void runCommand(); | 100 | void runCommand(); |
101 | void runCommandStd(); | 101 | void runCommandStd(); |
102 | QStringList getPath(); | 102 | QStringList getPath(); |
103 | void mkSym(); | 103 | void mkSym(); |
104 | void switchToLocalTab(); | 104 | void switchToLocalTab(); |
105 | void switchToRemoteTab(); | 105 | void switchToRemoteTab(); |
106 | 106 | ||
107 | protected: | 107 | protected: |
108 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; | 108 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; |
109 | QStringList remoteDirPathStringList, localDirPathStringList; | 109 | QStringList remoteDirPathStringList, localDirPathStringList; |
110 | 110 | ||
111 | void keyReleaseEvent( QKeyEvent *); | 111 | void keyReleaseEvent( QKeyEvent *); |
112 | QString getFileSystemType(const QString &); | 112 | QString getFileSystemType(const QString &); |
113 | void parsetab(const QString &fileName); | 113 | void parsetab(const QString &fileName); |
114 | 114 | ||
115 | protected slots: | 115 | protected slots: |
116 | void showFileMenu(); | 116 | void showFileMenu(); |
117 | void cancelMenuTimer(); | 117 | void cancelMenuTimer(); |
118 | void homeButtonPushed(); | 118 | void homeButtonPushed(); |
119 | void docButtonPushed(); | 119 | void docButtonPushed(); |
120 | void SDButtonPushed(); | 120 | void SDButtonPushed(); |
121 | void CFButtonPushed(); | 121 | void CFButtonPushed(); |
122 | void QPEButtonPushed(); | 122 | void QPEButtonPushed(); |
123 | void upDir(); | 123 | void upDir(); |
124 | void currentPathComboChanged(); | 124 | void currentPathComboChanged(); |
125 | void copy(); | 125 | void copy(); |
126 | void copyAs(); | 126 | void copyAs(); |
127 | void copySameDir(); | ||
127 | void currentPathComboActivated(const QString &); | 128 | void currentPathComboActivated(const QString &); |
128 | void fillCombo(const QString &); | 129 | void fillCombo(const QString &); |
129 | bool copyFile( const QString & , const QString & ); | 130 | bool copyFile( const QString & , const QString & ); |
130 | void move(); | 131 | void move(); |
131 | void fileStatus(); | 132 | void fileStatus(); |
132 | void doAbout(); | 133 | void doAbout(); |
133 | void doBeam(); | 134 | void doBeam(); |
134 | void fileBeamFinished( Ir *); | 135 | void fileBeamFinished( Ir *); |
135 | private: | 136 | private: |
136 | QTimer menuTimer; | 137 | QTimer menuTimer; |
137 | }; | 138 | }; |
138 | 139 | ||
139 | #endif // ADVANCEDFM_H | 140 | #endif // ADVANCEDFM_H |