[Kstars-devel] branches/kstars/summer/kdeedu/kstars
Akarsh Simha
akarshsimha at gmail.com
Fri Jun 13 09:48:36 CEST 2008
SVN commit 820105 by asimha:
+ Merging patches from trunk
+ Incorporating Tycho 1 star catalog down to magnitude 12.
It's amazing to see so much star density. Maybe the magnitude limit
formula requires a little more tweaking, because it is displaying far
too many stars at intermediate zoom levels and that is causing zoom-in
to respond a little slowly.
Thanks for the parsed catalog Jason!
CCMAIL: kstars-devel at kde.org
_M . (directory)
M kstars/data/deepstars.dat
M kstars/data/kstars.png
M kstars/data/shallowstars.dat
M kstars/data/starnames.dat
M +1 -1 kstars/data/tools/Makefile
M +6 -6 kstars/data/tools/mysql2bin.c
M +0 -5 kstars/kstars.h
M +0 -12 kstars/kstarsactions.cpp
M +3 -3 kstars/kstarsinit.cpp
M +3 -6 kstars/kstarsui.rc
M +2 -5 kstars/skycomponents/starcomponent.cpp
** branches/kstars/summer/kdeedu/kstars #property svnmerge-blocked
+ /trunk/KDE/kdeedu/kstars:818926
** branches/kstars/summer/kdeedu/kstars #property svnmerge-integrated
- /trunk/KDE/kdeedu/kstars:1-818540
+ /trunk/KDE/kdeedu/kstars:1-818925,818927-820077
--- branches/kstars/summer/kdeedu/kstars/kstars/data/tools/Makefile #820104:820105
@@ -11,7 +11,7 @@
MYSQL_CONFIG=/usr/bin/mysql_config
KSTARS_MYSQL_DB_TO_BIN=./mysql2bin
KSTARS_MYSQL_DB_DB=$(KSTARS_MYSQL_DB_USER)
-KSTARS_MYSQL_DB_TBL=allstars
+KSTARS_MYSQL_DB_TBL=tycho
all: mysql2bin binfiletester
--- branches/kstars/summer/kdeedu/kstars/kstars/data/tools/mysql2bin.c #820104:820105
@@ -12,16 +12,16 @@
#include <string.h>
#define TRIXEL_NAME_SIZE 8
-#define DB_TBL "allstars"
+#define DB_TBL "tycho"
#define DB_DB "stardb"
-#define VERBOSE 0
+#define VERBOSE 1
#define LONG_NAME_LIMIT 32
#define BAYER_LIMIT 8
#define HTM_LEVEL 3
#define NTRIXELS 512
#define INDEX_ENTRY_SIZE 8
#define GLOBAL_MAG_LIMIT 8.00
-#define MYSQL_STARS_PER_QUERY 400
+#define MYSQL_STARS_PER_QUERY 1000
/*
* struct to store star data, to be written in this format, into the binary file.
@@ -460,7 +460,7 @@
/* Build MySQL query for next MYSQL_STARS_PER_QUERY stars */
sprintf(query,
- "SELECT `trixel`, `ra`, `dec`, `dra`, `ddec`, `parallax`, `mag`, `bv_index`, `spec_type`, `mult`, `var_range`, `var_period`, `UID`, `name`, `gname` FROM `%s` ORDER BY `trixel`, `mag` ASC LIMIT %ld, %d",
+ "SELECT `Trixel`, `RA`, `Dec`, `dRA`, `dDec`, `Parallax`, `Mag`, `BV_Index`, `Spec_Type`, `Mult`, `Var`, `HD`, `UID`, `Name`, `GName` FROM `%s` ORDER BY `trixel`, `mag` ASC LIMIT %ld, %d",
(argc >= 10) ? argv[9] : DB_TBL, lim, MYSQL_STARS_PER_QUERY);
if(VERBOSE) { fprintf(stderr, "SQL Query: %s\n", query); }
@@ -556,13 +556,13 @@
str2int32(&data.dRA, row[3], 1);
str2int32(&data.dDec, row[4], 1);
str2int32(&data.parallax, row[5], 1);
- str2int32(&data.HD, "", 0); /* TODO: Put HD data into MySQL DB */
+ str2int32(&data.HD, row[11], 0);
str2int16(&data.bv_index, row[7], 2);
if(str2charv(data.spec_type, row[8], 2) < 0)
fprintf(stderr, "Spectral type entry %s in DB is possibly invalid for UID = %s\n", row[8], row[12]);
if(row[9][0] != '0' && row[9][0] != '\0')
data.flags = data.flags | 0x02;
- if(!isblank(row[10]) || !isblank(row[11]))
+ if(row[10][0] != '0' && row[10][0] != '\0')
data.flags = data.flags | 0x04;
/* Write the data into the appropriate data file and any names into the name file */
--- branches/kstars/summer/kdeedu/kstars/kstars/kstars.h #820104:820105
@@ -409,11 +409,6 @@
void slotApplyConfigChanges();
/**
- *action slot: Configure toolbars
- */
- void slotConfigureToolbars();
-
- /**
*action slot: Generate toolbars with new user-specified configuration
*/
void slotApplyToolbarConfig();
--- branches/kstars/summer/kdeedu/kstars/kstars/kstarsactions.cpp #820104:820105
@@ -344,18 +344,6 @@
}
}
-void KStars::slotConfigureToolbars() {
- saveMainWindowSettings( KGlobal::config()->group( "MainWindow" ) );
- KEditToolBar ket(actionCollection());
- connect( &ket, SIGNAL(newToolBarConfig()), this, SLOT(slotApplyToolbarConfig()) );
-
- //ket.exec();
- //DEBUG
- if ( ket.exec() == QDialog::Accepted ) {
- kDebug() << "KEditToolbar dialog returned Accepted";
- }
-}
-
void KStars::slotApplyToolbarConfig() {
//DEBUG
kDebug() << "Recreating GUI...";
--- branches/kstars/summer/kdeedu/kstars/kstars/kstarsinit.cpp #820104:820105
@@ -268,9 +268,6 @@
ta->setText( i18n( "Show View Toolbar" ) );
QObject::connect(ta, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool)));
- actionCollection()->addAction( KStandardAction::ConfigureToolbars, "configure_toolbars",
- this, SLOT( slotConfigureToolbars() ) );
-
//Statusbar view options
ta = actionCollection()->add<KToggleAction>( "show_statusBar");
ta->setText( i18n( "Show Statusbar" ) );
@@ -484,6 +481,9 @@
ta->setToolTip( i18n("Toggle opaque ground") );
connect( ta, SIGNAL( triggered() ), this, SLOT( slotViewToolBar() ) );
+ setXMLFile( "kstarsui.rc" );
+ setupGUI();
+
if (Options::fitsSaveDirectory().isEmpty())
Options::setFitsSaveDirectory(QDir:: homePath());
}
--- branches/kstars/summer/kdeedu/kstars/kstars/kstarsui.rc #820104:820105
@@ -89,12 +89,7 @@
<Action name="show_focus_box" />
<Action name="show_location_box" />
</Menu>
- <Menu name="toolbars"><text>&Toolbars</text>
- <Action name="show_mainToolBar" />
- <Action name="show_viewToolBar" />
- <Separator />
- <Action name="configure_toolbars" />
- </Menu>
+ <Merge name="StandardToolBarMenuHandler" />
<Menu name="statusbar"><text>&Statusbar</text>
<Action name="show_statusBar" />
<Separator />
@@ -106,6 +101,8 @@
<Separator />
<Action name="geolocation" />
<Separator />
+ <Action name="options_configure_keybinding"/>
+ <Action name="options_configure_toolbars"/>
<Action name="configure" />
<Action name="startwizard" />
</Menu>
--- branches/kstars/summer/kdeedu/kstars/kstars/skycomponents/starcomponent.cpp #820104:820105
@@ -201,15 +201,12 @@
reindex( data->updateNum() );
//adjust maglimit for ZoomLevel
- float maglim = Options::magLimitDrawStar();
double lgmin = log10(MINZOOM);
double lgmax = log10(MAXZOOM);
double lgz = log10(Options::zoomFactor());
- if ( lgz <= 0.75*lgmax )
- maglim -= (Options::magLimitDrawStar() -
- Options::magLimitDrawStarZoomOut() ) *
- (0.75*lgmax - lgz)/(0.75*lgmax - lgmin);
+
+ float maglim = 4.444 * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
m_zoomMagLimit = maglim;
More information about the Kstars-devel
mailing list