DisparityPlugin::DisparityPlugin() : config_widget_(new QWidget()), anchor_(TOP_LEFT), units_(PIXELS), offset_x_(0), offset_y_(0), width_(320), height_(240), has_image_(false), last_width_(0), last_height_(0) { ui_.setupUi(config_widget_); // Set background white QPalette p(config_widget_->palette()); p.setColor(QPalette::Background, Qt::white); config_widget_->setPalette(p); // Set status text red QPalette p3(ui_.status->palette()); p3.setColor(QPalette::Text, Qt::red); ui_.status->setPalette(p3); QObject::connect(ui_.selecttopic, SIGNAL(clicked()), this, SLOT(SelectTopic())); QObject::connect(ui_.topic, SIGNAL(editingFinished()), this, SLOT(TopicEdited())); QObject::connect(ui_.anchor, SIGNAL(activated(QString)), this, SLOT(SetAnchor(QString))); QObject::connect(ui_.units, SIGNAL(activated(QString)), this, SLOT(SetUnits(QString))); QObject::connect(ui_.offsetx, SIGNAL(valueChanged(int)), this, SLOT(SetOffsetX(int))); QObject::connect(ui_.offsety, SIGNAL(valueChanged(int)), this, SLOT(SetOffsetY(int))); QObject::connect(ui_.width, SIGNAL(valueChanged(int)), this, SLOT(SetWidth(int))); QObject::connect(ui_.height, SIGNAL(valueChanged(int)), this, SLOT(SetHeight(int))); }
AttitudeIndicatorPlugin::AttitudeIndicatorPlugin() : config_widget_(new QWidget()) { ui_.setupUi(config_widget_); // Set background white QPalette p(config_widget_->palette()); p.setColor(QPalette::Background, Qt::white); config_widget_->setPalette(p); roll_ = pitch_ = yaw_ = 0; topics_.push_back("nav_msgs/Odometry"); topics_.push_back("geometry_msgs/Pose"); topics_.push_back("sensor_msgs/Imu"); // Set status text red QPalette p3(ui_.status->palette()); p3.setColor(QPalette::Text, Qt::red); ui_.status->setPalette(p3); placer_.setRect(QRect(0, 0, 100, 100)); QObject::connect(this, SIGNAL(VisibleChanged(bool)), &placer_, SLOT(setVisible(bool))); QObject::connect(ui_.selecttopic, SIGNAL(clicked()), this, SLOT(SelectTopic())); QObject::connect(ui_.topic, SIGNAL(editingFinished()), this, SLOT(TopicEdited())); }
LaserScanPlugin::LaserScanPlugin() : config_widget_(new QWidget()), min_color_(Qt::white), max_color_(Qt::white), min_intensity_(0.0), max_intensity_(100.0), point_size_(3), buffer_size_(1) { ui_.setupUi(config_widget_); // Set background white QPalette p(config_widget_->palette()); p.setColor(QPalette::Background, Qt::white); config_widget_->setPalette(p); // Set status text red QPalette p3(ui_.status->palette()); p3.setColor(QPalette::Text, Qt::red); ui_.status->setPalette(p3); // Initialize color selector colors ui_.selectMinColor->setStyleSheet("background: " + min_color_.name() + ";"); ui_.selectMaxColor->setStyleSheet("background: " + max_color_.name() + ";"); QObject::connect(ui_.selecttopic, SIGNAL(clicked()), this, SLOT(SelectTopic())); QObject::connect(ui_.topic, SIGNAL(editingFinished()), this, SLOT(TopicEdited())); QObject::connect(ui_.selectMinColor, SIGNAL(clicked()), this, SLOT(SelectMinColor())); QObject::connect(ui_.selectMaxColor, SIGNAL(clicked()), this, SLOT(SelectMaxColor())); QObject::connect(ui_.minIntensity, SIGNAL(valueChanged(double)), this, SLOT(MinIntensityChanged(double))); QObject::connect(ui_.maxIntensity, SIGNAL(valueChanged(double)), this, SLOT(MaxIntensityChanged(double))); QObject::connect(ui_.bufferSize, SIGNAL(valueChanged(int)), this, SLOT(BufferSizeChanged(int))); QObject::connect(ui_.pointSize, SIGNAL(valueChanged(int)), this, SLOT(PointSizeChanged(int))); }
RoutePlugin::RoutePlugin() : config_widget_(new QWidget()), draw_style_(LINES) { ui_.setupUi(config_widget_); ui_.color->setColor(Qt::green); // Set background white QPalette p(config_widget_->palette()); p.setColor(QPalette::Background, Qt::white); config_widget_->setPalette(p); // Set status text red QPalette p3(ui_.status->palette()); p3.setColor(QPalette::Text, Qt::red); ui_.status->setPalette(p3); QObject::connect(ui_.selecttopic, SIGNAL(clicked()), this, SLOT(SelectTopic())); QObject::connect(ui_.topic, SIGNAL(editingFinished()), this, SLOT(TopicEdited())); QObject::connect(ui_.selectpositiontopic, SIGNAL(clicked()), this, SLOT(SelectPositionTopic())); QObject::connect(ui_.positiontopic, SIGNAL(editingFinished()), this, SLOT(PositionTopicEdited())); QObject::connect(ui_.drawstyle, SIGNAL(activated(QString)), this, SLOT(SetDrawStyle(QString))); QObject::connect(ui_.color, SIGNAL(colorEdited(const QColor&)), this, SLOT(DrawIcon())); }