-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ChrisTerBeke
committed
Mar 5, 2019
1 parent
c62b7f4
commit b6ec567
Showing
10 changed files
with
249 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (c) 2018 Chris ter Beke. | ||
// Thingiverse plugin is released under the terms of the LGPLv3 or higher. | ||
import QtQuick 2.2 | ||
import QtQuick.Controls 2.0 | ||
import QtQuick.Dialogs 1.1 | ||
import QtQuick.Layouts 1.3 | ||
import QtQuick.Window 2.2 | ||
import UM 1.1 as UM | ||
import Cura 1.0 as Cura | ||
|
||
// the main window header | ||
Rectangle | ||
{ | ||
id: header | ||
|
||
width: parent.width | ||
Layout.fillWidth: true | ||
height: UM.Theme.getSize("toolbox_header").height | ||
color: "#f5f5f5" | ||
|
||
RowLayout | ||
{ | ||
height: parent.height | ||
width: parent.width | ||
|
||
Image | ||
{ | ||
sourceSize.width: 100 | ||
source: "thingiverse-logo-2015.png" | ||
Layout.leftMargin: 20 | ||
Layout.rightMargin: 20 | ||
} | ||
|
||
TextField | ||
{ | ||
id: thingSearchField | ||
placeholderText: "Search for things..." | ||
Layout.alignment: Qt.AlignCenter | ||
Layout.preferredWidth: parent.width / 2 | ||
} | ||
|
||
Cura.PrimaryButton | ||
{ | ||
text: "Search" | ||
onClicked: ThingiService.search(thingSearchField.text) | ||
Layout.alignment: Qt.AlignCenter | ||
} | ||
|
||
Item | ||
{ | ||
Layout.fillWidth: true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) 2018 Chris ter Beke. | ||
// Thingiverse plugin is released under the terms of the LGPLv3 or higher. | ||
import QtQuick 2.2 | ||
import QtQuick.Controls 2.0 | ||
import QtQuick.Dialogs 1.1 | ||
import QtQuick.Layouts 1.3 | ||
import QtQuick.Window 2.2 | ||
import UM 1.1 as UM | ||
|
||
ColumnLayout | ||
{ | ||
anchors.fill: parent | ||
|
||
// the header | ||
ThingiHeader | ||
{ | ||
// has no props | ||
} | ||
|
||
// the search page | ||
ThingSearchPage | ||
{ | ||
width: parent.width | ||
visible: !ThingiService.hasActiveThing | ||
Layout.fillHeight: true | ||
} | ||
|
||
// the details page | ||
ThingDetailsPage | ||
{ | ||
width: parent.width | ||
thing: ThingiService.activeThing | ||
thingFiles: ThingiService.activeThingFiles | ||
visible: ThingiService.hasActiveThing | ||
Layout.fillHeight: true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ ScrollView | |
{ | ||
id: thingsList | ||
width: parent.width | ||
spacing: 20 | ||
|
||
delegate: Item | ||
{ | ||
width: parent.width | ||
|
Oops, something went wrong.