TargetsDialog.cpp   TargetsDialog.cpp 
skipping to change at line 21 skipping to change at line 21
* 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 "TargetsDialog.hpp" #include "TargetsDialog.hpp"
#include "LogBookCommon.hpp" #include "LogBookCommon.hpp"
#include "LogBook.hpp"
#include "ui_TargetsDialog.h" #include "ui_TargetsDialog.h"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelGui.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "StelModuleMgr.hpp"
#include "StelObjectMgr.hpp" #include "StelObjectMgr.hpp"
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
#include "StelMainScriptAPI.hpp" #include "StelMainScriptAPI.hpp"
//#include "StelTranslator.hpp" #include "StelStyle.hpp"
#include "StelTranslator.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include <QDebug> #include <QDebug>
#include <QList> #include <QList>
#include <QListIterator> #include <QListIterator>
#include <QModelIndex> #include <QModelIndex>
#include <QSqlError> #include <QSqlError>
#include <QSqlField> #include <QSqlField>
#include <QSqlRecord> #include <QSqlRecord>
#include <QSqlTableModel> #include <QSqlTableModel>
skipping to change at line 74 skipping to change at line 78
if (dialog) { if (dialog) {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
} }
} }
void TargetsDialog::styleChanged() void TargetsDialog::styleChanged()
{ {
// Nothing for now // Nothing for now
} }
void TargetsDialog::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);
ui->notesTextEdit->document()->setDefaultStyleSheet(QString(
pluginStyle.htmlStyleSheet));
}
}
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Slot Methods #pragma mark Slot Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
void TargetsDialog::aliasChanged() void TargetsDialog::aliasChanged()
{ {
QSqlRecord record = currentRecord(); QSqlRecord record = currentRecord();
if (!record.isEmpty() && record.value("alias") != ui->aliasLineEdit- >text()) { if (!record.isEmpty() && record.value("alias") != ui->aliasLineEdit- >text()) {
skipping to change at line 348 skipping to change at line 363
void TargetsDialog::createDialogContent() void TargetsDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
ui->targetsListView->setModel(tableModel); ui->targetsListView->setModel(tableModel);
ui->targetsListView->setModelColumn(1); ui->targetsListView->setModelColumn(1);
ui->typeComboBox->setModel(typeTableModel); ui->typeComboBox->setModel(typeTableModel);
ui->typeComboBox->setModelColumn(typeTableModel->fieldIndex("type")) ; ui->typeComboBox->setModelColumn(typeTableModel->fieldIndex("type")) ;
setupConnections(); setupConnections();
ui->targetsListView->setCurrentIndex(tableModel->index(0, 1)); ui->targetsListView->setCurrentIndex(tableModel->index(0, 1));
//Initialize the style
updateStyle();
} }
QSqlRecord TargetsDialog::currentRecord() QSqlRecord TargetsDialog::currentRecord()
{ {
if (lastRowNumberSelected == -1) { if (lastRowNumberSelected == -1) {
return QSqlRecord(); return QSqlRecord();
} else { } else {
return tableModel->record(lastRowNumberSelected); return tableModel->record(lastRowNumberSelected);
} }
} }
 End of changes. 6 change blocks. 
1 lines changed or deleted 22 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/