Compare commits
34 Commits
main
...
c76529b3cb
| Author | SHA1 | Date | |
|---|---|---|---|
| c76529b3cb | |||
| 5f5b1a4d39 | |||
| 4bb4ce1882 | |||
| 344efc0042 | |||
| a63acb18fc | |||
| f918d65888 | |||
| aa42ec6072 | |||
| 6f2a655497 | |||
| c0f38b531d | |||
| 4aad91416e | |||
| ff1b5ab2e6 | |||
| 491087a6c1 | |||
| c170b3b20d | |||
| 125041f469 | |||
| 67bf82d0cb | |||
| 39377b32f0 | |||
| 176efb97b7 | |||
| 755066d847 | |||
| 773d7818b5 | |||
| 7e58e3ee03 | |||
| 0f50577d78 | |||
| 29024e3999 | |||
| 5af09485a3 | |||
| e5b91eaed8 | |||
| be383869b2 | |||
| b9eee50e52 | |||
| 4cc43916cb | |||
| a5bed9ed2c | |||
| 0fac2b71ab | |||
| db2f878018 | |||
| 048d40eb83 | |||
| c70bba16e4 | |||
| 325cf285fc | |||
| aa8590cd5c |
@@ -107,8 +107,6 @@ cargo run
|
|||||||
clide
|
clide
|
||||||
```
|
```
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
It's recommended to use RustRover or Qt Creator for development.
|
It's recommended to use RustRover or Qt Creator for development.
|
||||||
|
|||||||
28
build.rs
28
build.rs
@@ -2,21 +2,21 @@ use cxx_qt_build::{CxxQtBuilder, QmlModule};
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
CxxQtBuilder::new_qml_module(QmlModule::new("clide.module").qml_files(&[
|
CxxQtBuilder::new_qml_module(QmlModule::new("clide.module").qml_files(&[
|
||||||
"qml/ClideApplicationView.qml",
|
|
||||||
"qml/ClideEditorView.qml",
|
|
||||||
"qml/ClideExplorerView.qml",
|
|
||||||
"qml/ClideTreeView.qml",
|
|
||||||
"qml/Components/ClideAboutWindow.qml",
|
|
||||||
"qml/Components/ClideBreadCrumbs.qml",
|
|
||||||
"qml/Components/ClideEditor.qml",
|
|
||||||
"qml/Components/ClideHandle.qml",
|
|
||||||
"qml/Components/ClideLogger.qml",
|
|
||||||
"qml/Components/ClideMenu.qml",
|
|
||||||
"qml/Components/ClideMenuBar.qml",
|
|
||||||
"qml/Components/ClideMenuItem.qml",
|
|
||||||
"qml/Components/ClideScrollBar.qml",
|
|
||||||
"qml/Logger/Logger.qml",
|
|
||||||
"qml/main.qml",
|
"qml/main.qml",
|
||||||
|
"qml/ClideAboutWindow.qml",
|
||||||
|
"qml/ClideTreeView.qml",
|
||||||
|
"qml/ClideApplicationView.qml",
|
||||||
|
"qml/ClideExplorerView.qml",
|
||||||
|
"qml/ClideEditor.qml",
|
||||||
|
"qml/ClideEditorView.qml",
|
||||||
|
"qml/ClideMenuBar.qml",
|
||||||
|
"qml/ClideLogger.qml",
|
||||||
|
"qml/Components/ClideScrollBar.qml",
|
||||||
|
"qml/Components/ClideHandle.qml",
|
||||||
|
"qml/Components/ClideMenu.qml",
|
||||||
|
"qml/Components/ClideMenuItem.qml",
|
||||||
|
"qml/Components/ClideBreadCrumbs.qml",
|
||||||
|
"qml/Logger/Logger.qml",
|
||||||
]))
|
]))
|
||||||
// Link Qt's Network library
|
// Link Qt's Network library
|
||||||
// - Qt Core is always linked
|
// - Qt Core is always linked
|
||||||
|
|||||||
@@ -104,6 +104,28 @@ Rectangle {
|
|||||||
onLinkActivated: function (link) {
|
onLinkActivated: function (link) {
|
||||||
Qt.openUrlExternally(link);
|
Qt.openUrlExternally(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Handle saving
|
||||||
|
// Component.onCompleted: {
|
||||||
|
// if (Qt.application.arguments.length === 2)
|
||||||
|
// textDocument.source = "file:" + Qt.application.arguments[1]
|
||||||
|
// else
|
||||||
|
// textDocument.source = "qrc:/texteditor.html"
|
||||||
|
// }
|
||||||
|
// textDocument.onStatusChanged: {
|
||||||
|
// // a message lookup table using computed properties:
|
||||||
|
// // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer
|
||||||
|
// const statusMessages = {
|
||||||
|
// [ TextDocument.ReadError ]: qsTr("Failed to load “%1”"),
|
||||||
|
// [ TextDocument.WriteError ]: qsTr("Failed to save “%1”"),
|
||||||
|
// [ TextDocument.NonLocalFileError ]: qsTr("Not a local file: “%1”"),
|
||||||
|
// }
|
||||||
|
// const err = statusMessages[textDocument.status]
|
||||||
|
// if (err) {
|
||||||
|
// errorDialog.text = err.arg(textDocument.source)
|
||||||
|
// errorDialog.open()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
FontMetrics {
|
FontMetrics {
|
||||||
@@ -23,7 +23,6 @@ Rectangle {
|
|||||||
SplitView {
|
SplitView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
orientation: Qt.Vertical
|
orientation: Qt.Vertical
|
||||||
spacing: 3
|
|
||||||
|
|
||||||
// Customized handle to drag between the Editor and the Console.
|
// Customized handle to drag between the Editor and the Console.
|
||||||
handle: ClideHandle {
|
handle: ClideHandle {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ TreeView {
|
|||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: current ? RustColors.explorer_folder_open : "transparent"
|
color: current ? RustColors.explorer_folder_open : "transparent"
|
||||||
radius: 20
|
radius: 20
|
||||||
width: root.width
|
width: root.width - 15
|
||||||
}
|
}
|
||||||
// Item name.
|
// Item name.
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
|||||||
@@ -20,11 +20,13 @@ Rectangle {
|
|||||||
if (cleaned.endsWith("/"))
|
if (cleaned.endsWith("/"))
|
||||||
cleaned = cleaned.slice(0, -1);
|
cleaned = cleaned.slice(0, -1);
|
||||||
Logger.trace("Building segments for path: " + cleaned);
|
Logger.trace("Building segments for path: " + cleaned);
|
||||||
segments = ["/"];
|
segments = [];
|
||||||
fullPaths = ["/"];
|
fullPaths = [];
|
||||||
|
segments.push("/");
|
||||||
|
fullPaths.push("/");
|
||||||
let parts = cleaned.split("/");
|
let parts = cleaned.split("/");
|
||||||
let current = "";
|
let current = "";
|
||||||
// We already pushed the root `/` path during initialization, so skip index 0.
|
// We already pushed the root `/` path above, so skip index 0.
|
||||||
for (let i = 1; i < parts.length; ++i) {
|
for (let i = 1; i < parts.length; ++i) {
|
||||||
current += "/" + parts[i];
|
current += "/" + parts[i];
|
||||||
Logger.trace("Pushing path: " + parts[i] + " Current: " + current);
|
Logger.trace("Pushing path: " + parts[i] + " Current: " + current);
|
||||||
|
|||||||
@@ -3,7 +3,3 @@ ClideHandle ClideHandle.qml
|
|||||||
ClideMenu ClideMenu.qml
|
ClideMenu ClideMenu.qml
|
||||||
ClideMenuItem ClideMenuItem.qml
|
ClideMenuItem ClideMenuItem.qml
|
||||||
ClideBreadCrumbs ClideBreadCrumbs.qml
|
ClideBreadCrumbs ClideBreadCrumbs.qml
|
||||||
ClideAboutWindow ClideAboutWindow.qml
|
|
||||||
ClideEditor ClideEditor.qml
|
|
||||||
ClideLogger ClideLogger.qml
|
|
||||||
ClideMenuBar ClideMenuBar.qml
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 402 KiB |
@@ -57,6 +57,7 @@ pub mod qobject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Implement a provider for QFileSystemModel::setIconProvider for icons.
|
||||||
pub struct FileSystemImpl {
|
pub struct FileSystemImpl {
|
||||||
file_path: QString,
|
file_path: QString,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user