~petr-kubanek/stellarium/stellarium

« back to all changes in this revision

Viewing changes to plugins/Quasars/src/Quasars.cpp

  • Committer: Georg Zotti
  • Date: 2017-05-22 14:27:36 UTC
  • Revision ID: georg.zotti@univie.ac.at-20170522142736-sw2kjxe3ntlwba5u
Q_NULLPTR refactoring completed for all plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
Quasars::Quasars()
84
84
        : QsrCount(0)
85
85
        , updateState(CompleteNoUpdates)
86
 
        , downloadMgr(NULL)
 
86
        , downloadMgr(Q_NULLPTR)
87
87
        , updateTimer(0)
88
88
        , messageTimer(0)
89
89
        , updatesEnabled(false)
91
91
        , enableAtStartup(false)
92
92
        , flagShowQuasars(false)
93
93
        , flagShowQuasarsButton(false)
94
 
        , OnIcon(NULL)
95
 
        , OffIcon(NULL)
96
 
        , GlowIcon(NULL)
97
 
        , toolbarButton(NULL)
98
 
        , progressBar(NULL)
 
94
        , OnIcon(Q_NULLPTR)
 
95
        , OffIcon(Q_NULLPTR)
 
96
        , GlowIcon(Q_NULLPTR)
 
97
        , toolbarButton(Q_NULLPTR)
 
98
        , progressBar(Q_NULLPTR)
99
99
 
100
100
{
101
101
        setObjectName("Quasars");
297
297
StelObjectP Quasars::searchByName(const QString& englishName) const
298
298
{
299
299
        if (!flagShowQuasars)
300
 
                return NULL;
 
300
                return Q_NULLPTR;
301
301
 
302
302
        foreach(const QuasarP& quasar, QSO)
303
303
        {
305
305
                        return qSharedPointerCast<StelObject>(quasar);
306
306
        }
307
307
 
308
 
        return NULL;
 
308
        return Q_NULLPTR;
309
309
}
310
310
 
311
311
StelObjectP Quasars::searchByNameI18n(const QString& nameI18n) const
312
312
{
313
313
        if (!flagShowQuasars)
314
 
                return NULL;
 
314
                return Q_NULLPTR;
315
315
 
316
316
        foreach(const QuasarP& quasar, QSO)
317
317
        {
319
319
                        return qSharedPointerCast<StelObject>(quasar);
320
320
        }
321
321
 
322
 
        return NULL;
 
322
        return Q_NULLPTR;
323
323
}
324
324
 
325
325
QStringList Quasars::listMatchingObjects(const QString& objPrefix, int maxNbItem, bool useStartOfWords, bool inEnglish) const
621
621
        updateState = Quasars::Updating;
622
622
        emit(updateStateChanged(updateState));  
623
623
 
624
 
        if (progressBar==NULL)
 
624
        if (progressBar==Q_NULLPTR)
625
625
                progressBar = StelApp::getInstance().addProgressBar();
626
626
 
627
627
        progressBar->setValue(0);
669
669
        {
670
670
                progressBar->setValue(100);
671
671
                StelApp::getInstance().removeProgressBar(progressBar);
672
 
                progressBar = NULL;
 
672
                progressBar = Q_NULLPTR;
673
673
        }
674
674
}
675
675
 
703
703
void Quasars::setFlagShowQuasarsButton(bool b)
704
704
{
705
705
        StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
706
 
        if (gui!=NULL)
 
706
        if (gui!=Q_NULLPTR)
707
707
        {
708
708
                if (b==true) {
709
 
                        if (toolbarButton==NULL) {
 
709
                        if (toolbarButton==Q_NULLPTR) {
710
710
                                // Create the quasars button
711
 
                                toolbarButton = new StelButton(NULL, *OnIcon, *OffIcon, *GlowIcon, "actionShow_Quasars");
 
711
                                toolbarButton = new StelButton(Q_NULLPTR, *OnIcon, *OffIcon, *GlowIcon, "actionShow_Quasars");
712
712
                        }
713
713
                        gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup");
714
714
                } else {