Skip to content

Commit

Permalink
Merge pull request #2 from Iktwo/master
Browse files Browse the repository at this point in the history
Remove file:https:// from title
  • Loading branch information
ndesai committed Oct 31, 2015
2 parents a04025b + c8752bc commit 9ef424b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
2 changes: 0 additions & 2 deletions app/SQLiteEditor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty("$", &utility);
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));



return app.exec();
}

Expand Down
14 changes: 9 additions & 5 deletions app/SQLiteEditor/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Views.AppWindow {
id: superRoot

property QtObject queries : QtObject {
property string tableView : "SELECT * FROM sqlite_master WHERE type = 'table' OR type = 'view' ORDER BY type"
readonly property string tableView : "SELECT * FROM sqlite_master WHERE type = 'table' OR type = 'view' ORDER BY type"
property string fat : "SELECT * FROM Track tra JOIN (SELECT * FROM Album alb JOIN Artist art ON art.ArtistId = alb.ArtistId) albart ON tra.AlbumId = albart.AlbumId"
}

Expand All @@ -20,6 +20,7 @@ Views.AppWindow {
databasePath: superRoot.activeDatabase
onResultsReady: {
console.log("ready = " + query)
console.log("results", Object.keys(results))
if(query == queries.tableView)
{
_ListView_Tables.model = results
Expand All @@ -39,25 +40,28 @@ Views.AppWindow {
z: theme.z.header
}


Rectangle {
id: _Rectangle_Navigation
width: 72

anchors.top: _Header.bottom
anchors.bottom: parent.bottom
color: theme.asphalt

width: 72
color: theme.asphalt

ListView {
id: _ListView_Navigation

anchors.fill: parent

interactive: false

model: [
{
image : "img/icon-tables.png"
}
]

delegate: Rectangle {
width: ListView.view.width
height: width
Expand Down Expand Up @@ -120,9 +124,9 @@ Views.AppWindow {
z: 2
}


ListView {
id: _ListView_Tables

anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
Expand Down
21 changes: 17 additions & 4 deletions app/SQLiteEditor/qml/views/Header.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ import st.app 1.0 as AppStreet
Rectangle {
anchors.left: parent.left
anchors.right: parent.right

height: 40

gradient: theme.headerGradient
radius: theme.windowRadius

MouseArea {
anchors.fill: parent
property int _x
property int _y

anchors.fill: parent

onPressed: {
_x = mouse.x
_y = mouse.y
Expand All @@ -27,20 +31,24 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10

height: 14
spacing: 8

YosemiteButton {
color: theme.yosemite.exitColor
onClicked: {
Qt.quit()
}
}

YosemiteButton {
color: theme.yosemite.minimizeColor
onClicked: {
superRoot.showMinimized()
}
}

YosemiteButton {
color: theme.yosemite.expandColor
onClicked: {
Expand All @@ -51,20 +59,24 @@ Rectangle {

Label {
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter

width: 500

horizontalAlignment: Text.AlignHCenter
color: theme.text
styleColor: theme.white
style: Text.Raised
text: [superRoot.title, superRoot.activeDatabase.toString()].filter(Boolean).join(" - ")
text: [superRoot.title, superRoot.activeDatabase.toString().replace("file:https://", "")].filter(Boolean).join(" - ")
}

Row {
anchors.right: parent.right
anchors.rightMargin: 10
layoutDirection: Qt.RightToLeft
anchors.verticalCenter: parent.verticalCenter

layoutDirection: Qt.RightToLeft
spacing: 10

Button {
height: 30
text: "Open Database"
Expand Down Expand Up @@ -141,6 +153,7 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom

height: 1
color: theme.headerAccent
}
Expand Down

0 comments on commit 9ef424b

Please sign in to comment.