Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
Index File Manager
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
KDE
Index File Manager
Commits
9b93f6d2
Commit
9b93f6d2
authored
Jul 09, 2019
by
Camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work again with qmltermwidget
parent
0cf0d2bf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
95 deletions
+87
-95
CMakeLists.txt
CMakeLists.txt
+11
-8
src/index.cpp
src/index.cpp
+6
-7
src/main.cpp
src/main.cpp
+0
-9
src/widgets/views/Browser.qml
src/widgets/views/Browser.qml
+70
-71
No files found.
CMakeLists.txt
View file @
9b93f6d2
...
...
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.0)
find_package
(
ECM 1.7.0 REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
${
ECM_MODULE_PATH
}
)
find_package
(
MauiKit REQUIRED
)
#
find_package(MauiKit REQUIRED)
find_package
(
Qt5 REQUIRED NO_MODULE COMPONENTS Qml Quick Sql Svg QuickControls2 Widgets
)
include
(
KDEInstallDirs
)
include
(
KDECompilerSettings NO_POLICY_SCOPE
)
...
...
@@ -14,33 +14,36 @@ include(FeatureSummary)
include
(
ECMAddAppIcon
)
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
set
(
CMAKE_AUTOMOC ON
)
set
(
CMAKE_AUTORCC ON
)
set
(
CMAKE_CXX_STANDARD 11
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
add_executable
(
index
src/assets.qrc
src/main.cpp
src/index.cpp
src/qml.qrc
src/kde/notify.cpp
#
src/kde/notify.cpp
)
if
(
ANDROID
)
find_package
(
Qt5 REQUIRED COMPONENTS AndroidExtras
)
target_link_libraries
(
vvave
Qt5::AndroidExtras
)
target_link_libraries
(
index
Qt5::AndroidExtras
)
kde_source_files_enable_exceptions
(
index src/index.cpp
)
else
()
find_package
(
KF5
${
KF5_VERSION
}
REQUIRED COMPONENTS I18n Notifications Config KIO Service Attica
)
else
()
#
find_package(KF5 ${KF5_VERSION} REQUIRED COMPONENTS I18n Notifications Config KIO Service Attica)
find_package
(
Qt5 REQUIRED COMPONENTS WebEngine
)
target_link_libraries
(
index KF5::ConfigCore KF5::Notifications KF5::KIOCore KF5::I18n KF5::Service KF5::Attica
)
#
target_link_libraries(index KF5::ConfigCore KF5::Notifications KF5::KIOCore KF5::I18n KF5::Service KF5::Attica)
endif
()
if
(
TARGET create-apk-index
)
set_target_properties
(
create-apk-index PROPERTIES ANDROID_APK_DIR
"
${
MAUIKIT_ANDROID_DIR
}
"
)
endif
()
target_link_libraries
(
index
MauiKit
Qt5::Sql Qt5::Qml Qt5::Widgets Qt5::Svg
)
target_link_libraries
(
index Qt5::Sql Qt5::Qml Qt5::Widgets Qt5::Svg
)
install
(
TARGETS index
${
KDE_INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES org.kde.index.desktop DESTINATION
${
XDG_APPS_INSTALL_DIR
}
)
...
...
src/index.cpp
View file @
9b93f6d2
...
...
@@ -12,15 +12,14 @@ Index::Index(QObject *parent) : QObject(parent) {}
/* to be called to launch index with opening different paths */
void
Index
::
openPaths
(
const
QStringList
&
paths
)
{
QStringList
urls
;
for
(
auto
path
:
paths
)
emit
this
->
openPath
(
std
::
accumulate
(
paths
.
constBegin
(),
paths
.
constEnd
(),
QStringList
(),
[](
QStringList
&
list
,
const
QString
&
path
)
->
QStringList
{
QFileInfo
file
(
path
);
const
QFileInfo
file
(
path
);
if
(
file
.
isDir
())
urls
<<
path
;
list
<<
path
;
else
urls
<<
file
.
dir
().
absolutePath
();
}
list
<<
file
.
dir
().
absolutePath
();
emit
this
->
openPath
(
urls
);
return
list
;
}));
}
src/main.cpp
View file @
9b93f6d2
...
...
@@ -19,15 +19,6 @@
#include "./../3rdparty/kirigami/src/kirigamiplugin.h"
#endif
#ifdef STATIC_MAUIKIT
#include "./../mauikit/src/mauikit.h"
#include "tagging.h"
#include "fm.h"
#else
#include "MauiKit/tagging.h"
#include "MauiKit/fm.h"
#endif
int
main
(
int
argc
,
char
*
argv
[])
{
QCoreApplication
::
setAttribute
(
Qt
::
AA_EnableHighDpiScaling
);
...
...
src/widgets/views/Browser.qml
View file @
9b93f6d2
import
QtQuick
2.9
import
QtQuick
.
Controls
2.
2
import
QtQuick
.
Controls
2.
13
import
QtQuick
.
Layouts
1.3
import
org
.
kde
.
kirigami
2.0
as
Kirigami
import
org
.
kde
.
mauikit
1.0
as
Maui
//import FMH 1.0
ColumnLayout
SplitView
{
id
:
control
spacing
:
0
orientation
:
Qt
.
Vertical
property
alias
browser
:
browser
property
bool
terminalVisible
:
fals
e
//
property alias terminal : terminalLoader.item
property
bool
terminalVisible
:
tru
e
property
alias
terminal
:
terminalLoader
.
item
Maui.FileBrowser
{
id
:
browser
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.margins
:
0
SplitView.fillWidth
:
true
SplitView.fillHeight
:
true
headBar.visible
:
true
headBar.drawBorder
:
true
headBar.plegable
:
false
menu
:[
MenuItem
{
visible
:
!
isMobile
text
:
qsTr
(
"
Show terminal
"
)
checkable
:
true
checked
:
terminalVisible
onTriggered
:
{
terminalVisible
=
!
terminalVisible
Maui
.
FM
.
setDirConf
(
browser
.
currentPath
+
"
/.directory
"
,
"
MAUIFM
"
,
"
ShowTerminal
"
,
terminalVisible
)
}
}
/*,
// Maui.MenuItem
// MenuItem
// {
// visible: !isMobile
// text: qsTr("Show terminal")
// checkable: true
// checked: placesSidebar.isCollapsed
// text: qsTr("Compact mode")
// onTriggered: placesSidebar.isCollapsed = !placesSidebar.isCollapsed
// }*/
// checked: terminalVisible
// onTriggered:
// {
// terminalVisible = !terminalVisible
// Maui.FM.setDirConf(browser.currentPath+"/.directory", "MAUIFM", "ShowTerminal", terminalVisible)
// }
// }
]
headBar.rightContent
:
ToolButton
{
icon.name
:
"
akonadiconsole
"
onClicked
:
control
.
terminalVisible
=
!
control
.
terminalVisible
checked
:
control
.
terminalVisible
checkable
:
false
}
onNewBookmark
:
{
for
(
var
index
in
paths
)
...
...
@@ -54,20 +53,17 @@ ColumnLayout
onCurrentPathChanged
:
{
if
(
!
isAndroid
)
terminalVisible
=
Maui
.
FM
.
dirConf
(
currentPath
+
"
/.directory
"
)[
"
showterminal
"
]
===
"
true
"
?
true
:
false
//
if(!isAndroid)
//
terminalVisible = Maui.FM.dirConf(currentPath+"/.directory")["showterminal"] === "true" ? true : false
//
if(terminalVisible && !isMobile)
// terminal.session.sendText("cd " + currentPath + "
\n")
if
(
terminalVisible
&&
!
isMobile
)
terminal
.
session
.
sendText
(
"
cd '
"
+
currentPath
+
"
'
\n
"
)
for
(
var
i
=
0
;
i
<
placesSidebar
.
count
;
i
++
)
if
(
currentPath
===
placesSidebar
.
list
.
get
(
i
).
path
)
placesSidebar
.
currentIndex
=
i
}
anchors.top
:
parent
.
top
anchors.bottom
:
terminalVisible
?
handle
.
top
:
parent
.
bottom
onItemClicked
:
openItem
(
index
)
onItemDoubleClicked
:
...
...
@@ -81,52 +77,55 @@ ColumnLayout
}
}
Rectangle
{
id
:
handle
visible
:
true
Layout.fillWidth
:
true
height
:
5
color
:
"
transparent
"
// Rectangle
// {
// id: handle
// visible: true
Kirigami.Separator
{
visible
:
terminalLoader
.
visible
anchors
{
bottom
:
parent
.
bottom
right
:
parent
.
right
left
:
parent
.
left
}
}
// Layout.fillWidth: true
// height: 5
// color: "transparent"
MouseArea
{
visible
:
terminalLoader
.
visible
// Kirigami.Separator
//
{
//
visible: terminalLoader.visible
anchors.fill
:
parent
drag.target
:
parent
drag.axis
:
Drag
.
YAxis
drag.smoothed
:
true
cursorShape
:
Qt
.
SizeVerCursor
}
}
// anchors
// {
// bottom: parent.bottom
// right: parent.right
// left: parent.left
// }
// }
// MouseArea
// {
// visible: terminalLoader.visible
// anchors.fill: parent
// drag.target: parent
// drag.axis: Drag.YAxis
// drag.smoothed: true
// cursorShape: Qt.SizeVerCursor
// }
// }
// handle: Rectangle
// {
// color: "yellow"
// }
Loader
{
id
:
terminalLoader
visible
:
fals
e
visible
:
terminalVisibl
e
focus
:
true
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.alignment
:
Qt
.
AlignBottom
Layout.minimumHeight
:
100
Layout.maximumHeight
:
control
.
height
*
0.3
anchors.bottom
:
parent
.
bottom
anchors.top
:
handle
.
bottom
// source: !isMobile ? "Terminal.qml" : undefined
SplitView.fillWidth
:
true
SplitView.fillHeight
:
true
SplitView.minimumHeight
:
100
SplitView.maximumHeight
:
500
SplitView.preferredHeight
:
200
source
:
!
isMobile
?
"
Terminal.qml
"
:
undefined
}
}
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