Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KStars
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
28
Issues
28
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
KStars
Commits
b782780a
Commit
b782780a
authored
Aug 15, 2012
by
Samikshan Bairagya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not suggest optimum magnification for now. Also no need for WI interface to be translucent.
parent
a56f894d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
55 deletions
+5
-55
kstars/tools/whatsinteresting/qml/wiview.qml
kstars/tools/whatsinteresting/qml/wiview.qml
+3
-42
kstars/tools/whatsinteresting/wiview.cpp
kstars/tools/whatsinteresting/wiview.cpp
+2
-13
No files found.
kstars/tools/whatsinteresting/qml/wiview.qml
View file @
b782780a
...
...
@@ -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
:
detailsView
Container
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
:
5
04
y
:
5
20
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
}
}
]
}
kstars/tools/whatsinteresting/wiview.cpp
View file @
b782780a
...
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment