Brief description of class still missing. More...
#include <CityLoader.h>
Public Slots | |
void | on_clearBut_clicked () |
void | on_closeBut_clicked () |
void | on_loadBut_clicked () |
void | on_mountBut_clicked () |
void | on_pathBrowse_clicked () |
void | on_unmountBut_clicked () |
void | scan () |
Public Member Functions | |
CityLoader (QWidget *parent=0) | |
~CityLoader () |
Brief description of class still missing.
Full description of class still missing
GeopsyGui::CityLoader::CityLoader | ( | QWidget * | parent = 0 | ) |
Description of constructor still missing
: Dialog(parent) { TRACE; setupUi(this); _scanner=new CityScanner(this); // Create log stream for scanner thread Application::instance()->setStream(logView , _scanner); signalView->setModel(new CitySignalItem (_scanner, this) ); signalView->setSelectionBehavior(QAbstractItemView::SelectRows); signalView->setSelectionMode(QAbstractItemView::ExtendedSelection); signalView->setEditTriggers(QAbstractItemView::NoEditTriggers); connect (pathEdit, SIGNAL(textChanged( const QString& )), this, SLOT(scan()) ); connect (_scanner, SIGNAL(signalsChanged()), this, SLOT(resetSignalView()), Qt::QueuedConnection); #ifndef Q_WS_X11 delete mountBut; mountBut=0; delete unmountBut; unmountBut=0; #endif }
void GeopsyGui::CityLoader::on_clearBut_clicked | ( | ) | [slot] |
void GeopsyGui::CityLoader::on_closeBut_clicked | ( | ) | [slot] |
References GeopsyCore::CityScanner::cleanStop(), and TRACE.
void GeopsyGui::CityLoader::on_loadBut_clicked | ( | ) | [slot] |
References GeopsyCore::SubSignalPool::addFile(), GeopsyCore::CityScanner::at(), GeopsyCore::CityScanner::cleanStop(), GeopsyCore::CityScanner::count(), GeopsyCore::GeopsyCoreEngine::currentDB(), GeopsyCore::SignalDB::filePool(), GeopsyCore::geopsyCore, GeopsyCore::SubSignalPool::isEmpty(), GeopsyCore::SignalFilePool::last(), GeopsyCore::CitySignal::loadSignals(), MSG_ID, GeopsyCore::GeopsyPreferences::oneWindowPerFile(), GeopsyCore::GeopsyCoreEngine::preferences(), GeopsyCore::CityScanner::readStream(), GeopsyCore::GeopsyCoreEngine::showLoadedSignals(), QGpCoreTools::tr(), and TRACE.
{ TRACE; _scanner->cleanStop(); bool selectAll=false; if( !isAnySelected()) { if(Message::question(MSG_ID, tr( "Loading flash card" ), tr( "No files were selected, do you want to load all of them?" ), Message::yes(), Message::cancel())==Message::Answer1) { return ; } selectAll=true; } QFile * stream=_scanner->readStream(); SignalFilePool& fpool=geopsyCore->currentDB() ->filePool(); SubSignalPool subPool; if(stream) { QItemSelectionModel & selModel=*signalView->selectionModel(); QModelIndex rIndex=signalView->rootIndex(); int n=_scanner->count(); for(int i=0;i < n;i++ ) { if(selectAll || selModel.isRowSelected(i, rIndex) ) { if(_scanner->at(i)->loadSignals(stream)) { subPool.addFile(fpool.last()); if(geopsyCore->preferences()->oneWindowPerFile()) { SubSignalPool subPool; subPool.addFile(fpool.last()); geopsyCore->showLoadedSignals(subPool); } } } } if(!geopsyCore->preferences()->oneWindowPerFile() && !subPool.isEmpty()) { geopsyCore->showLoadedSignals(subPool); } delete stream; } }
void GeopsyGui::CityLoader::on_mountBut_clicked | ( | ) | [slot] |
References QGpCoreTools::endl(), scan(), QGpCoreTools::tr(), and TRACE.
void GeopsyGui::CityLoader::on_pathBrowse_clicked | ( | ) | [slot] |
void GeopsyGui::CityLoader::on_unmountBut_clicked | ( | ) | [slot] |
References GeopsyCore::CityScanner::clear(), QGpCoreTools::endl(), QGpCoreTools::tr(), and TRACE.
void GeopsyGui::CityLoader::scan | ( | ) | [slot] |
References GeopsyCore::CityScanner::setPath(), and TRACE.
Referenced by CityLoader(), GeopsyMainWindow::loadCity(), and on_mountBut_clicked().