Skip to content

Commit

Permalink
Add CFileBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Sep 19, 2024
1 parent f58d58e commit e9a391d
Show file tree
Hide file tree
Showing 82 changed files with 3,335 additions and 443 deletions.
8 changes: 8 additions & 0 deletions App/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "RabbitCommonEncrypt.h"
#ifdef HAVE_RABBITCOMMON_GUI
#include "DockFolderBrowser.h"
#include "FileBrowser.h"
#endif
#include "RabbitCommonDir.h"

Expand Down Expand Up @@ -171,3 +172,10 @@ void MainWindow::slotDownloadError(int nErr, const QString szErr)
{
qDebug(log) << "Download file error:" << nErr << szErr;
}

void MainWindow::on_actionFolder_browser_triggered()
{
CFileBrowser *pBF = new CFileBrowser();
pBF->exec();
}

2 changes: 2 additions & 0 deletions App/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ private slots:
void slotDownloadFile(const QString szFile);
void slotDownloadError(int nErr, const QString szErr);

void on_actionFolder_browser_triggered();

private:
Ui::MainWindow *ui;

Expand Down
20 changes: 12 additions & 8 deletions App/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
<string>Log</string>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
<enum>QToolButton::ToolButtonPopupMode::MenuButtonPopup</enum>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
<enum>Qt::ToolButtonStyle::ToolButtonIconOnly</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
<enum>Qt::ArrowType::NoArrow</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -133,7 +133,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>27</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menuAbout">
Expand All @@ -147,29 +147,33 @@
<property name="title">
<string>Tools</string>
</property>
<addaction name="actionFolder_browser"/>
</widget>
<addaction name="menuAbout"/>
<addaction name="menuTools"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionAbout">
<property name="icon">
<iconset theme="help-about">
<normaloff>.</normaloff>.</iconset>
<iconset theme="help-about"/>
</property>
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionUpdate">
<property name="icon">
<iconset theme="system-software-update">
<normaloff>.</normaloff>.</iconset>
<iconset theme="system-software-update"/>
</property>
<property name="text">
<string>Update</string>
</property>
</action>
<action name="actionFolder_browser">
<property name="text">
<string>Folder browser</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions App/Resource/Translations/RabbitCommonApp_en_GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,31 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.ui" line="170"/>
<location filename="../../MainWindow.ui" line="169"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="46"/>
<location filename="../../MainWindow.ui" line="174"/>
<location filename="../../MainWindow.cpp" line="47"/>
<source>Folder browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Encrypt:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MainWindow.cpp" line="129"/>
<location filename="../../MainWindow.cpp" line="130"/>
<source>Source:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../main.cpp" line="49"/>
<location filename="../../main.cpp" line="48"/>
<source>RabbitCommon</source>
<translation type="unfinished"></translation>
</message>
Expand Down
Loading

0 comments on commit e9a391d

Please sign in to comment.