Commit b782780a authored by Samikshan Bairagya's avatar Samikshan Bairagya

Do not suggest optimum magnification for now. Also no need for WI interface to be translucent.

parent a56f894d
......@@ -123,7 +123,6 @@ Rectangle {
onEntered: container.state = "planetAreaEntered"
onClicked: {
viewsRow.categorySelected(0)
oMagText.visible = false
container.state = "soTypeSelected"
}
}
......@@ -155,7 +154,6 @@ Rectangle {
onEntered: container.state = "starAreaEntered"
onClicked: {
viewsRow.categorySelected(1)
oMagText.visible = false
container.state = "soTypeSelected"
}
}
......@@ -187,7 +185,6 @@ Rectangle {
onEntered: container.state = "conAreaEntered"
onClicked: {
viewsRow.categorySelected(2)
oMagText.visible = false
container.state = "soTypeSelected"
}
}
......@@ -265,7 +262,6 @@ Rectangle {
onEntered: container.state = "galAreaEntered"
onClicked: {
viewsRow.categorySelected(3)
oMagText.visible = true
container.state = "soTypeSelected"
}
}
......@@ -305,7 +301,6 @@ Rectangle {
onEntered: container.state = "nebAreaEntered"
onClicked: {
viewsRow.categorySelected(5)
oMagText.visible = true
container.state = "soTypeSelected"
}
}
......@@ -345,7 +340,6 @@ Rectangle {
onEntered: container.state = "clustAreaEntered"
onClicked: {
viewsRow.categorySelected(4)
oMagText.visible = true
container.state = "soTypeSelected"
}
}
......@@ -439,7 +433,7 @@ Rectangle {
Rectangle {
id: detailsViewBackground
anchors.fill: detailsViewContainer
anchors.fill: detailsView
color: "#00060b"
opacity: 0.5
}
......@@ -544,10 +538,8 @@ Rectangle {
height: 15
color: "#ffffff"
text: qsTr("text")
anchors.horizontalCenterOffset: 0
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 12
}
......@@ -713,7 +705,7 @@ Rectangle {
Rectangle {
id: backButton
x: container.width + 10
y: 504
y: 520
width: 114
height: 49
color: "#00000000"
......@@ -785,14 +777,11 @@ Rectangle {
y: 528
width: 28
height: 28
anchors.verticalCenter: backButton.verticalCenter
sourceSize.height: 40
sourceSize.width: 40
smooth: true
fillMode: Image.Stretch
anchors.left: parent.left
anchors.leftMargin: 9
anchors.bottom: parent.bottom
anchors.bottomMargin: 6
source: "settingsIcon.png"
MouseArea {
......@@ -811,22 +800,6 @@ Rectangle {
}
}
Text {
id: oMagText
objectName: "oMagTextObj"
x: 8
y: 481
width: 297
height: 14
color: "#ffffff"
text: qsTr("")
opacity: 0
visible: false
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: 12
}
states: [
State {
name: "base"
......@@ -845,11 +818,6 @@ Rectangle {
target: clustText
color: "#6b6660"
}
PropertyChanges {
target: oMagText
visible: false
}
},
State {
name: "planetAreaEntered"
......@@ -1240,11 +1208,6 @@ Rectangle {
target: backButton
x: 236
}
PropertyChanges {
target: oMagText
opacity: 1
}
}
]
......@@ -1300,14 +1263,12 @@ Rectangle {
to: "soTypeSelected"
NumberAnimation { target: viewsRow; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
NumberAnimation { target: backButton; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
NumberAnimation { target: oMagText; property: "opacity"; duration: 1000; easing.type: Easing.InOutQuad }
},
Transition {
from: "soTypeSelected"
to: "base"
NumberAnimation { target: viewsRow; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
NumberAnimation { target: backButton; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
NumberAnimation { target: oMagText; property: "opacity"; duration: 100; easing.type: Easing.InOutQuad }
}
]
}
......@@ -30,10 +30,6 @@ WIView::WIView(QWidget *parent, ObsConditions *obs) : QWidget(parent)
QDeclarativeView *baseView = new QDeclarativeView();
baseView->setAttribute(Qt::WA_TranslucentBackground);
baseView->setStyleSheet("background: transparent;");
baseView->setWindowFlags(Qt::FramelessWindowHint);
ctxt = baseView->rootContext();
baseView->setSource(KStandardDirs::locate("appdata","tools/whatsinteresting/qml/wiview.qml"));
......@@ -58,12 +54,8 @@ WIView::WIView(QWidget *parent, ObsConditions *obs) : QWidget(parent)
QObject *closeButtonObj = m_BaseObj->findChild<QObject *>("closeButtonObj");
connect(closeButtonObj, SIGNAL(closeButtonClicked()), baseView, SLOT(close()));
m_OptMag = obs->getOptimumMAG();
baseView->setResizeMode(QDeclarativeView::SizeRootObjectToView);
baseView->show();
data->setWIView(baseView);
}
......@@ -75,9 +67,6 @@ WIView::~WIView()
void WIView::onCategorySelected(int type)
{
QString oMagText = QString("Suggested optimum magnification : ") + QString::number(m_OptMag);
QObject *oMagTextObj = m_BaseObj->findChild<QObject *>("oMagTextObj");
switch(type)
{
case 0: ///Planet type
......@@ -89,7 +78,6 @@ void WIView::onCategorySelected(int type)
case 4: ///Cluster type
case 5: ///Nebula type
ctxt->setContextProperty("soListModel", m->returnModel(type));
oMagTextObj->setProperty("text", oMagText);
break;
}
}
......@@ -134,7 +122,8 @@ void WIView::loadDetailsView(SkyObjItem *soitem, int index)
///Slew map to selected sky-object
SkyObject* so = soitem->getSkyObject();
KStars* data = KStars::Instance();
if (so != 0) {
if (so != 0)
{
data->map()->setFocusPoint(so);
data->map()->setFocusObject(so);
data->map()->setDestination(*data->map()->focusPoint());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment