void gprsBusinessLogic::defaultGprsNetworkRegistrationInfoReceived ( QMap<QString, QVariant> properties) { SYS_DEBUG(""); m_OperatorName = properties["Name"].toString(); SYS_DEBUG ("Operator = %s", SYS_STR(m_OperatorName)); delete m_AdapterDBusIfNetworkRegistration; emit refreshNeeded (); }
/** * \brief Perform phase correlation * * This method performs the phase correlation and constructs a new image * if a refresh is needed. */ Point RefreshingTracker::correlate(const ConstImageAdapter<double>& adapter, PhaseCorrelator& correlator) { Point offset = correlator(*_image, adapter).first; debug(LOG_DEBUG, DEBUG_LOG, 0, "correlate %s with %s -> %s", _image->size().toString().c_str(), adapter.getSize().toString().c_str(), offset.toString().c_str()); if (refreshNeeded()) { refresh(adapter, offset); } return _offset + offset; }
RulesManager::RulesManager(const QList<Rule> *rules, ConditionManager *conditionManager, Action *action, const Preferences *preferences, QObject *parent) : QObject(parent), _rules(rules), _conditionManager(conditionManager), _action(action), _preferences(preferences) { connect(_conditionManager, SIGNAL(refreshNeeded()), this, SLOT(refresh())); }
CharInfo::Collation CollationDB::insert(const char *nam, size_t *siz, CollationInfo::CollationFlags flags, Int32 defaultMatchCount) { CMPASSERT(defaultMatchCount >= 0); size_t mat = (size_t)defaultMatchCount; CMPASSERT(siz[0] > mat); // up to n-1 name parts can match siz[0] = mat; // no longer cnt of total nameparts, // now it is cnt of MATCHING parts // Well before getting to overflow, wrap around to begin again // with automatically generated numbers for non-builtin collations. if (nextUserCo_ > 2147000000) // well shy of INT_MAX nextUserCo_ = CharInfo::FIRST_USER_DEFINED_COLLATION; CharInfo::Collation co = (CharInfo::Collation)nextUserCo_++; CollationInfo *collInfo = new (heap_) CollationInfo(heap_, co, nam, flags, siz); CollationDBSupertype::insert(collInfo); refreshNeeded() = FALSE; return co; }
void ThemeWidget::createWidgets () { QGraphicsLinearLayout *mainLayout; /* * Creating and setting up the main layout */ mainLayout = new QGraphicsLinearLayout(Qt::Vertical); mainLayout->setContentsMargins (0., 0., 0., 0.); mainLayout->setSpacing (0.); /* * Creating the list with the available themes. */ m_List = new MList(); m_List->setObjectName ("ThemeList"); // We only connect the themeChangeStarted if we have a chance to sense the // end of the theme change too. just to be sure. if (connect (m_ThemeBusinessLogic, SIGNAL (themeChanged (QString)), SLOT (enableList ()))) { connect (m_ThemeBusinessLogic, SIGNAL (themeChangeStarted (QString)), SLOT (disableList ())); } // Cellcreator m_CellCreator = new ThemeCellCreator; m_List->setCellCreator (m_CellCreator); m_List->setSelectionMode (MList::SingleSelection); // This function will create the m_LiveFilterEditor widget. readLocalThemes (); /* * An item to activate the OVI link. */ m_OviItem = new MBasicListItem (MBasicListItem::IconWithTitle); m_OviItem->setObjectName("OviItem"); // Currently we use the default. //m_OviItem->setLayoutPosition (M::VerticalCenterPosition); m_OviItem->imageWidget()->setImage ("icon-m-common-ovi"); /* * Adding everything to the layout. */ m_LiveFilterEditor->setParentLayoutItem (mainLayout); mainLayout->addItem (m_OviItem); mainLayout->addItem (m_List); /* * Connecting to the signals. */ connect (m_OviItem, SIGNAL(clicked()), this, SLOT(oviActivated())); connect (m_LiveFilterEditor, SIGNAL(textChanged()), this, SLOT(textChanged ())); connect (m_List, SIGNAL(panningStarted()), this, SLOT(hideEmptyTextEdit())); connect (m_ThemeBusinessLogic, SIGNAL(refreshNeeded()), this, SLOT(refreshNeeded ())); setLayout(mainLayout); retranslateUi (); }
void Window::init() { const int scrollBarWidth = 15; // +-------------------------------------------------------+ // | Create the menubar | // +-------------------------------------------------------+ this->menuBar = new QMenuBar(this); this->menuSystem = new QMenu(this->menuBar); this->menuSystem->setTitle("System"); this->menuSystemStart = new QAction(this->menuSystem); this->menuSystemStart->setText("Start"); this->menuSystemStop = new QAction(this->menuSystem); this->menuSystemStop->setText("Stop"); this->menuSystemConfiguration = new QAction(this->menuSystem); this->menuSystemConfiguration->setText("System configuration panel"); this->menuSystemConfiguration->setCheckable(true); this->menuSystemConfigurationOpen = new QAction(this->menuSystem); this->menuSystemConfigurationOpen->setText("Open system configuration vector..."); this->menuSystemConfigurationSave = new QAction(this->menuSystem); this->menuSystemConfigurationSave->setText("Save system configuration vector..."); this->menuSystemQuit = new QAction(this->menuSystem); this->menuSystemQuit->setText("Quit"); this->menuView = new QMenu(this->menuBar); this->menuView->setTitle("View"); this->menuViewLatitude = new QAction(this->menuView); this->menuViewLatitude->setText("Latitude"); this->menuViewLatitude->setCheckable(true); this->menuViewLongitude = new QAction(this->menuView); this->menuViewLongitude->setText("Longitude"); this->menuViewLongitude->setCheckable(true); this->menuViewSphere = new QAction(this->menuView); this->menuViewSphere->setText("Sphere"); this->menuViewSphere->setCheckable(true); this->menuViewConfiguration = new QAction(this->menuView); this->menuViewConfiguration->setText("View configuration panel"); this->menuViewConfiguration->setCheckable(true); this->menuViewConfigurationOpen = new QAction(this->menuView); this->menuViewConfigurationOpen->setText("Open view configuration vector..."); this->menuViewConfigurationSave = new QAction(this->menuView); this->menuViewConfigurationSave->setText("Save view configuration vector..."); this->menuSystem->addAction(this->menuSystemStart); this->menuSystem->addAction(this->menuSystemStop); this->menuSystem->addSeparator(); this->menuSystem->addAction(this->menuSystemConfiguration); this->menuSystem->addSeparator(); this->menuSystem->addAction(this->menuSystemConfigurationOpen); this->menuSystem->addAction(this->menuSystemConfigurationSave); this->menuSystem->addSeparator(); this->menuSystem->addAction(this->menuSystemQuit); this->menuView->addAction(this->menuViewLatitude); this->menuView->addAction(this->menuViewLongitude); this->menuView->addAction(this->menuViewSphere); this->menuView->addSeparator(); this->menuView->addAction(this->menuViewConfiguration); this->menuView->addSeparator(); this->menuView->addAction(this->menuViewConfigurationOpen); this->menuView->addAction(this->menuViewConfigurationSave); this->menuBar->addAction(this->menuSystem->menuAction()); this->menuBar->addAction(this->menuView->menuAction()); this->setMenuBar(this->menuBar); // Connect each action with its corresponding function QObject::connect(this->menuSystemStart, SIGNAL(triggered()), this, SLOT(menuSystemStartClicked())); QObject::connect(this->menuSystemStop, SIGNAL(triggered()), this, SLOT(menuSystemStopClicked())); QObject::connect(this->menuSystemConfiguration, SIGNAL(triggered(bool)), this, SLOT(menuSystemConfigurationToggled())); QObject::connect(this->menuSystemConfigurationOpen, SIGNAL(triggered()), this, SLOT(menuSystemConfigurationOpenClicked())); QObject::connect(this->menuSystemConfigurationSave, SIGNAL(triggered()), this, SLOT(menuSystemConfigurationSaveClicked())); QObject::connect(this->menuSystemQuit, SIGNAL(triggered()), this, SLOT(menuSystemQuitClicked())); QObject::connect(this->menuViewLatitude, SIGNAL(triggered()), this, SLOT(menuViewLatitudeToggled())); QObject::connect(this->menuViewLongitude, SIGNAL(triggered()), this, SLOT(menuViewLongitudeToggled())); QObject::connect(this->menuViewSphere, SIGNAL(triggered()), this, SLOT(menuViewSphereToggled())); QObject::connect(this->menuViewConfiguration, SIGNAL(triggered()), this, SLOT(menuViewConfigurationToggled())); QObject::connect(this->menuViewConfigurationOpen, SIGNAL(triggered()), this, SLOT(menuViewConfigurationOpenClicked())); QObject::connect(this->menuViewConfigurationSave, SIGNAL(triggered()), this, SLOT(menuViewConfigurationSaveClicked())); // +-------------------------------------------------------+ // | Create the docks | // +-------------------------------------------------------+ this->dockConfigSystem = new QDockWidget(); this->dockConfigSystem->setWindowTitle("System configuration"); this->dockConfigSystem->setMinimumWidth(250); this->dockConfigView = new QDockWidget(); this->dockConfigView->setWindowTitle("View configuration"); this->dockConfigView->setMinimumWidth(250); this->addDockWidget(Qt::LeftDockWidgetArea, this->dockConfigSystem); this->addDockWidget(Qt::LeftDockWidgetArea, this->dockConfigView); this->listPropertiesSystem = new ScrollListProperty(this->dockConfigSystem->width(),scrollBarWidth,this->dockConfigSystem->height()); this->dockConfigSystem->setWidget(this->listPropertiesSystem); this->listPropertiesView = new ScrollListProperty(this->dockConfigView->width(),scrollBarWidth,this->dockConfigView->height()); this->dockConfigView->setWidget(this->listPropertiesView); // +-------------------------------------------------------+ // | Populate the docks | // +-------------------------------------------------------+ this->parametersManager = new ParametersManager(); this->parametersManager->initView(); this->parametersManager->initSystem(); this->listPropertiesView->loadParameters(this->parametersManager->getRootPropertyView()); this->listPropertiesSystem->loadParameters(this->parametersManager->getRootPropertySystem()); this->parametersManager->loadViewDefault(); this->parametersManager->loadSystemDefault(); // +-------------------------------------------------------+ // | Configure the view by default | // +-------------------------------------------------------+ setViewLongitude(true); setViewLatitude(true); setViewSphere(true); // +-------------------------------------------------------+ // | Resize the window | // +-------------------------------------------------------+ this->resize(this->windowWidth, this->windowHeight); // +-------------------------------------------------------+ // | Create widgets | // +-------------------------------------------------------+ this->mdiArea = new QMdiArea(this); this->setCentralWidget(this->mdiArea); this->colorPalette = new ColorPalette(); //this->potentialSourceManager = new PotentialSourceManager(10.0,48000.0/512.0); this->sourceManager = new SourceManager(10,this->colorPalette); // +-------------------------------------------------------+ // | Create sub windows | // +-------------------------------------------------------+ this->mdiWinLongitude = new WinLongitude(600,300,48000,512,this->sourceManager); this->mdiWinLatitude = new WinLatitude(600,300,48000,512,this->sourceManager); //this->mdiWinBeamformerLongitude = new WinBeamformerLongitude(600,300,48000,512,this->potentialSourceManager); //this->mdiWinBeamformerLatitude = new WinBeamformerLatitude(600,300,48000,512,this->potentialSourceManager); this->mdiWinSphere = new WinSphere(800,300,48000,512,this->sourceManager,5); this->mdiWinLongitude->setWindowTitle("Longitude"); this->mdiWinLatitude->setWindowTitle("Latitude"); //this->mdiWinBeamformerLongitude->setWindowTitle("Potential sources longitude"); //this->mdiWinBeamformerLatitude->setWindowTitle("Potential sources latitude"); this->mdiWinSphere->setWindowTitle("3D View"); this->mdiArea->addSubWindow(this->mdiWinLongitude); this->mdiArea->addSubWindow(this->mdiWinLatitude); //this->mdiArea->addSubWindow(this->mdiWinBeamformerLongitude); //this->mdiArea->addSubWindow(this->mdiWinBeamformerLatitude); this->mdiArea->addSubWindow(this->mdiWinSphere); // +-------------------------------------------------------+ // | Connect signal to slot for refresh | // +-------------------------------------------------------+ QObject::connect(this,SIGNAL(refreshNeeded()),this,SLOT(performRefresh())); // +-------------------------------------------------------+ // | Connect signal to confirm system is stopped | // +-------------------------------------------------------+ QObject::connect(this,SIGNAL(confirmOperation()),this,SLOT(confirmReadyOperation())); // +-------------------------------------------------------+ // | Create the sound card selection dialog | // +-------------------------------------------------------+ this->soundInputConfig = new SoundInputConfig(1024,512,48000,8); // +-------------------------------------------------------+ // | Init status of the menu bar | // +-------------------------------------------------------+ setSystemRunning(false); this->running = false; // +-------------------------------------------------------+ // | Adjust appearance according to default parameters | // +-------------------------------------------------------+ refreshViewAppearance(); // +-------------------------------------------------------+ // | Connect signal to slot for updating appearance | // +-------------------------------------------------------+ QObject::connect(this->listPropertiesView->getListProperty(), SIGNAL(valueChanged()), this, SLOT(slotRefreshViewAppearance())); QObject::connect(this->listPropertiesSystem->getListProperty(), SIGNAL(valueChanged()), this, SLOT(slotRefreshSystemCore())); // +-------------------------------------------------------+ // | Operation | // +-------------------------------------------------------+ // By default no operation triggered this->userOperation = NOP; }