Adding customer done..still the GUI needs retouches
This commit is contained in:
@@ -253,7 +253,7 @@ ColumnLayout
|
||||
if (!checkAddContact.checked)
|
||||
{
|
||||
new_business = JsLib.addBusiness(businessGrid)
|
||||
business_model.addBusiness(new_business)
|
||||
business_model.addBusiness(new_business, 0)
|
||||
appLoader.source = "CustomerTable.qml"
|
||||
}
|
||||
else
|
||||
|
||||
@@ -74,7 +74,7 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: 40
|
||||
movableColumns: true //@disable-check M16
|
||||
syncView: testTable
|
||||
syncView: customerTable
|
||||
|
||||
delegate: Rectangle {
|
||||
color: addBusinessBtn.palette.alternateBase
|
||||
@@ -99,7 +99,7 @@ Item {
|
||||
{
|
||||
//property var customWidths: [0.2, 0.5, 0.3, 05, 0.2, 0.2]
|
||||
property real newWidth: 0
|
||||
id: testTable
|
||||
id: customerTable
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
columnSpacing: 1
|
||||
@@ -111,7 +111,7 @@ Item {
|
||||
selectionModel: ItemSelectionModel
|
||||
{
|
||||
id: selModel
|
||||
model: testTable.model
|
||||
model: customerTable.model
|
||||
}
|
||||
|
||||
// columnWidthProvider: function(column)
|
||||
@@ -137,7 +137,7 @@ Item {
|
||||
repeat: false
|
||||
onTriggered:
|
||||
{
|
||||
testTable.forceLayout();
|
||||
customerTable.forceLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,11 +147,11 @@ Item {
|
||||
{
|
||||
required property bool selected
|
||||
required property bool current
|
||||
implicitWidth: testTable.width / testTable.columns
|
||||
implicitWidth: customerTable.width / customerTable.columns
|
||||
implicitHeight: 25
|
||||
color: selected
|
||||
? addBusinessBtn.palette.highlight //palette.highlight
|
||||
: (testTable.alternatingRows && row % 2 !== 0
|
||||
: (customerTable.alternatingRows && row % 2 !== 0
|
||||
? addBusinessBtn.palette.base // palette.base
|
||||
: addBusinessBtn.palette.alternateBase) //palette.alternateBase)
|
||||
|
||||
@@ -178,7 +178,7 @@ Item {
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
testTable.selectionModel.select(testTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||
customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user