LogBookConfigDialog.cpp   LogBookConfigDialog.cpp 
skipping to change at line 19 skipping to change at line 19
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include "LogBookConfigDialog.hpp" #include "LogBook.hpp"
#include "LogBookCommon.hpp" #include "LogBookCommon.hpp"
#include "LogBookConfigDialog.hpp"
#include "dataMappers/BarlowsDataMapper.hpp" #include "dataMappers/BarlowsDataMapper.hpp"
#include "dataMappers/FiltersDataMapper.hpp" #include "dataMappers/FiltersDataMapper.hpp"
#include "dataMappers/ImagersDataMapper.hpp" #include "dataMappers/ImagersDataMapper.hpp"
#include "dataMappers/ObserversDataMapper.hpp" #include "dataMappers/ObserversDataMapper.hpp"
#include "dataMappers/OcularsDataMapper.hpp" #include "dataMappers/OcularsDataMapper.hpp"
#include "dataMappers/OpticsDataMapper.hpp" #include "dataMappers/OpticsDataMapper.hpp"
#include "dataMappers/SitesDataMapper.hpp" #include "dataMappers/SitesDataMapper.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelGui.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "StelModuleMgr.hpp"
#include "StelStyle.hpp"
#include "StelTranslator.hpp"
#include "ui_LogBookConfigDialog.h" #include "ui_LogBookConfigDialog.h"
#include <QDebug> #include <QDebug>
#include <QDoubleValidator> #include <QDoubleValidator>
#include <QDataWidgetMapper> #include <QDataWidgetMapper>
#include <QFile> #include <QFile>
#include <QMessageBox> #include <QMessageBox>
#include <QSqlError> #include <QSqlError>
#include <QSqlField> #include <QSqlField>
skipping to change at line 98 skipping to change at line 103
if (dialog) { if (dialog) {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
} }
} }
void LogBookConfigDialog::styleChanged() void LogBookConfigDialog::styleChanged()
{ {
// Nothing for now // Nothing for now
} }
void LogBookConfigDialog::updateStyle()
{
if(dialog) {
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance()
.getGui());
Q_ASSERT(gui);
const StelStyle pluginStyle = GETSTELMODULE(LogBook)->getMod
uleStyleSheet(gui->getStelStyle());
dialog->setStyleSheet(pluginStyle.qtStyleSheet);
}
}
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Public Slot Methods #pragma mark Public Slot Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
void LogBookConfigDialog::closeWindow() void LogBookConfigDialog::closeWindow()
{ {
setVisible(false); setVisible(false);
StelMainGraphicsView::getInstance().scene()->setActiveWindow(0); StelMainGraphicsView::getInstance().scene()->setActiveWindow(0);
skipping to change at line 122 skipping to change at line 137
#pragma mark - #pragma mark -
#pragma mark Protected Methods #pragma mark Protected Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
void LogBookConfigDialog::createDialogContent() void LogBookConfigDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
setupWidgets(); setupWidgets();
setupListViews(); setupListViews();
//Initialize the style
updateStyle();
} }
void LogBookConfigDialog::setupListViews() void LogBookConfigDialog::setupListViews()
{ {
barlowsWidget->barlowsListView->setModel(tableModels[BARLOWS]); barlowsWidget->barlowsListView->setModel(tableModels[BARLOWS]);
barlowsWidget->barlowsListView->setModelColumn(1); barlowsWidget->barlowsListView->setModelColumn(1);
new BarlowsDataMapper(barlowsWidget, tableModels, this); new BarlowsDataMapper(barlowsWidget, tableModels, this);
filtersWidget->filtersListView->setModel(tableModels[FILTERS]); filtersWidget->filtersListView->setModel(tableModels[FILTERS]);
filtersWidget->filtersListView->setModelColumn(1); filtersWidget->filtersListView->setModelColumn(1);
skipping to change at line 210 skipping to change at line 228
<< tr("Solar") << tr("Spotting"); << tr("Solar") << tr("Spotting");
QStringListModel *typeModel = new QStringListModel(items, this); QStringListModel *typeModel = new QStringListModel(items, this);
opticsWidget->typeComboBox->setModel(typeModel); opticsWidget->typeComboBox->setModel(typeModel);
*/ */
QWidget *sites = new QWidget(ui->stackedWidget); QWidget *sites = new QWidget(ui->stackedWidget);
sitesWidget->setupUi(sites); sitesWidget->setupUi(sites);
ui->stackedWidget->addWidget(sites); ui->stackedWidget->addWidget(sites);
widgets[SITES] = sites; widgets[SITES] = sites;
// Layout the ListWidget // Layout the ListWidget
ui->pagesListWidget->addItem(tr("Barlows")); ui->pagesListWidget->addItem(N_("Barlows"));
ui->pagesListWidget->addItem(tr("Filters")); ui->pagesListWidget->addItem(N_("Filters"));
ui->pagesListWidget->addItem(tr("Imagers")); ui->pagesListWidget->addItem(N_("Imagers"));
ui->pagesListWidget->addItem(tr("Observers")); ui->pagesListWidget->addItem(N_("Observers"));
ui->pagesListWidget->addItem(tr("Oculars")); ui->pagesListWidget->addItem(N_("Oculars"));
ui->pagesListWidget->addItem(tr("Optics")); ui->pagesListWidget->addItem(N_("Optics"));
ui->pagesListWidget->addItem(tr("Sites")); ui->pagesListWidget->addItem(N_("Sites"));
ui->pagesListWidget->setCurrentRow(0); ui->pagesListWidget->setCurrentRow(0);
connect(ui->pagesListWidget, SIGNAL(currentRowChanged(int)), ui->sta ckedWidget, SLOT(setCurrentIndex(int))); connect(ui->pagesListWidget, SIGNAL(currentRowChanged(int)), ui->sta ckedWidget, SLOT(setCurrentIndex(int)));
} }
 End of changes. 7 change blocks. 
8 lines changed or deleted 28 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/