Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
5868dbc1
Commit
5868dbc1
authored
Aug 12, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added progress indicator, download speed
Also updated to latest QGCUASFileManager implementation.
parent
1fa53faa
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
215 additions
and
83 deletions
+215
-83
QGCUASFileView.cc
src/ui/QGCUASFileView.cc
+171
-71
QGCUASFileView.h
src/ui/QGCUASFileView.h
+19
-10
QGCUASFileView.ui
src/ui/QGCUASFileView.ui
+25
-2
No files found.
src/ui/QGCUASFileView.cc
View file @
5868dbc1
This diff is collapsed.
Click to expand it.
src/ui/QGCUASFileView.h
View file @
5868dbc1
...
...
@@ -42,29 +42,38 @@ protected:
private
slots
:
void
_refreshTree
(
void
);
void
_downloadFiles
(
void
);
void
_treeStatusMessage
(
const
QString
&
msg
);
void
_treeErrorMessage
(
const
QString
&
msg
);
void
_listEntryReceived
(
const
QString
&
entry
);
void
_listErrorMessage
(
const
QString
&
msg
);
void
_listComplete
(
void
);
void
_downloadStatusMessage
(
const
QString
&
msg
);
void
_downloadFile
(
void
);
void
_downloadLength
(
unsigned
int
length
);
void
_downloadProgress
(
unsigned
int
length
);
void
_downloadErrorMessage
(
const
QString
&
msg
);
void
_downloadComplete
(
void
);
void
_currentItemChanged
(
QTreeWidgetItem
*
current
,
QTreeWidgetItem
*
previous
);
void
_listCompleteTimeout
(
void
);
private:
void
_setupListCompleteTimeout
(
void
);
void
_clearListCompleteTimeout
(
void
);
void
_connectDownloadSignals
(
void
);
void
_disconnectDownloadSignals
(
void
);
void
_connectListSignals
(
void
);
void
_disconnectListSignals
(
void
);
void
_requestDirectoryList
(
const
QString
&
dir
);
static
const
int
_typeFile
=
QTreeWidgetItem
::
UserType
+
1
;
static
const
int
_typeDir
=
QTreeWidgetItem
::
UserType
+
2
;
static
const
int
_typeError
=
QTreeWidgetItem
::
UserType
+
3
;
QTimer
_listCompleteTimer
;
///> Used to signal a timeout waiting for a listComplete signal
static
const
int
_listCompleteTimerTimeoutMsecs
=
5000
;
///> Timeout in msecs for listComplete timer
QList
<
int
>
_walkIndexStack
;
QList
<
QTreeWidgetItem
*>
_walkItemStack
;
Ui
::
QGCUASFileView
_ui
;
QString
_downloadFilename
;
///< File currently being downloaded, not including path
QTime
_downloadStartTime
;
///< Time at which download started
bool
_listInProgress
;
///< Indicates that a listDirectory command is in progress
bool
_downloadInProgress
;
///< Indicates that a downloadPath command is in progress
};
#endif // QGCUASFILEVIEW_H
src/ui/QGCUASFileView.ui
View file @
5868dbc1
...
...
@@ -14,13 +14,23 @@
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"
1
"
column=
"1"
>
<item
row=
"
3
"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"listFilesButton"
>
<property
name=
"text"
>
<string>
List Files
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
colspan=
"3"
>
<widget
class=
"QProgressBar"
name=
"progressBar"
>
<property
name=
"value"
>
<number>
24
</number>
</property>
<property
name=
"textVisible"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
colspan=
"3"
>
<widget
class=
"QTreeWidget"
name=
"treeWidget"
>
<property
name=
"headerHidden"
>
...
...
@@ -33,7 +43,7 @@
</column>
</widget>
</item>
<item
row=
"
1
"
column=
"2"
>
<item
row=
"
3
"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"downloadButton"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
...
...
@@ -43,6 +53,19 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"3"
>
<widget
class=
"QLabel"
name=
"statusText"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment