Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
KStars
Commits
61533ad9
Commit
61533ad9
authored
Jun 23, 2012
by
Samikshan Bairagya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show position of skyobjects on the details view of the QML user interface.
parent
a8127f0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
kstars/tools/WhatsInteresting/Base.qml
kstars/tools/WhatsInteresting/Base.qml
+19
-2
kstars/tools/WhatsInteresting/WIView.cpp
kstars/tools/WhatsInteresting/WIView.cpp
+2
-0
kstars/tools/WhatsInteresting/skyobjitem.cpp
kstars/tools/WhatsInteresting/skyobjitem.cpp
+5
-0
kstars/tools/WhatsInteresting/skyobjitem.h
kstars/tools/WhatsInteresting/skyobjitem.h
+1
-0
No files found.
kstars/tools/WhatsInteresting/Base.qml
View file @
61533ad9
...
...
@@ -158,11 +158,28 @@ Rectangle {
objectName
:
"
sonameObj
"
x
:
17
y
:
24
width
:
268
height
:
230
width
:
117
height
:
51
color
:
"
#ffffff
"
text
:
qsTr
(
"
text
"
)
font.bold
:
true
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
font.pixelSize
:
16
}
Text
{
id
:
posText
objectName
:
"
posTextObj
"
x
:
17
y
:
111
width
:
273
height
:
31
color
:
"
#ffffff
"
text
:
qsTr
(
"
text
"
)
font.underline
:
true
font.italic
:
true
font.bold
:
true
font.pixelSize
:
12
}
}
...
...
kstars/tools/WhatsInteresting/WIView.cpp
View file @
61533ad9
...
...
@@ -128,6 +128,8 @@ void WIView::onSoListItemClicked(QString type, int index)
void
WIView
::
loadDetailsView
(
SkyObjItem
*
soitem
)
{
QObject
*
sonameObj
=
detailsViewObj
->
findChild
<
QObject
*>
(
"sonameObj"
);
QObject
*
posTextObj
=
detailsViewObj
->
findChild
<
QObject
*>
(
"posTextObj"
);
sonameObj
->
setProperty
(
"text"
,
soitem
->
getName
());
posTextObj
->
setProperty
(
"text"
,
soitem
->
getPosition
());
detailsViewObj
->
setProperty
(
"visible"
,
true
);
}
kstars/tools/WhatsInteresting/skyobjitem.cpp
View file @
61533ad9
...
...
@@ -67,3 +67,8 @@ void SkyObjItem::setPosition(SkyObject* so)
position
=
QString
::
number
(
rounded_altitude
).
append
(
" degrees above the "
).
append
(
cardinals
[
rounded_azimuth
]).
append
(
" horizon "
);
kDebug
()
<<
position
;
}
QString
SkyObjItem
::
getPosition
()
{
return
position
;
}
kstars/tools/WhatsInteresting/skyobjitem.h
View file @
61533ad9
...
...
@@ -40,6 +40,7 @@ public:
inline
QString
getName
()
{
return
name
;
}
inline
QString
getType
()
{
return
type
;
}
void
setPosition
(
SkyObject
*
so
);
QString
getPosition
();
private:
QString
name
;
QString
type
;
...
...
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