Changeset View
Changeset View
Standalone View
Standalone View
ksgrd/SensorManager.cpp
Show All 15 Lines | |||||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. | ||
18 | 18 | | |||
19 | You should have received a copy of the GNU General Public License | 19 | You should have received a copy of the GNU General Public License | ||
20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | 21 | | |||
22 | */ | 22 | */ | ||
23 | 23 | | |||
24 | #include <QApplication> | 24 | #include <QCoreApplication> | ||
25 | #include <QDebug> | 25 | #include <QDebug> | ||
26 | #include <klocalizedstring.h> | 26 | #include <klocalizedstring.h> | ||
27 | #include <QWidget> | | |||
28 | #include <QEvent> | 27 | #include <QEvent> | ||
29 | #include <kconfiggroup.h> | 28 | #include <kconfiggroup.h> | ||
30 | #include "ksgrd_debug.h" | 29 | #include "ksgrd_debug.h" | ||
31 | 30 | | |||
32 | #include "SensorShellAgent.h" | 31 | #include "SensorShellAgent.h" | ||
33 | #include "SensorSocketAgent.h" | 32 | #include "SensorSocketAgent.h" | ||
34 | 33 | | |||
35 | #include "SensorManager.h" | 34 | #include "SensorManager.h" | ||
▲ Show 20 Lines • Show All 304 Lines • ▼ Show 20 Line(s) | 337 | { | |||
340 | * displays the message in a pop-up box. It must be used for objects | 339 | * displays the message in a pop-up box. It must be used for objects | ||
341 | * that might have been deleted before the pop-up box is closed. */ | 340 | * that might have been deleted before the pop-up box is closed. */ | ||
342 | if ( mBroadcaster ) { | 341 | if ( mBroadcaster ) { | ||
343 | MessageEvent *event = new MessageEvent( msg ); | 342 | MessageEvent *event = new MessageEvent( msg ); | ||
344 | qApp->postEvent( mBroadcaster, event ); | 343 | qApp->postEvent( mBroadcaster, event ); | ||
345 | } | 344 | } | ||
346 | } | 345 | } | ||
347 | 346 | | |||
348 | void SensorManager::setBroadcaster( QWidget *wdg ) | 347 | void SensorManager::setBroadcaster( QObject *wdg ) | ||
349 | { | 348 | { | ||
350 | mBroadcaster = wdg; | 349 | mBroadcaster = wdg; | ||
351 | } | 350 | } | ||
352 | 351 | | |||
353 | void SensorManager::reconfigure( const SensorAgent* ) | 352 | void SensorManager::reconfigure( const SensorAgent* ) | ||
354 | { | 353 | { | ||
355 | emit update(); | 354 | emit update(); | ||
356 | } | 355 | } | ||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |