QvisLineStyleWidget::QvisLineStyleWidget(int style, QWidget *parent) :
    QWidget(parent)
{
    // Create some pixmaps and store them in the application global
    // pixmap cache.
    QPixmap style1Pixmap;
    if(!QPixmapCache::find("visit_gui_linestyle1", style1Pixmap))
    {
        AugmentPixmap(style1);
        QPixmap s1p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linestyle1", s1p);
        style1Pixmap = s1p;
    }
    QPixmap style2Pixmap;
    if(!QPixmapCache::find("visit_gui_linestyle2", style2Pixmap))
    {
        AugmentPixmap(style2);
        QPixmap s2p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linestyle2", s2p);
        style2Pixmap = s2p;
    }
    QPixmap style3Pixmap;
    if(!QPixmapCache::find("visit_gui_linestyle3", style3Pixmap))
    {
        AugmentPixmap(style3);
        QPixmap s3p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linestyle3", s3p);
        style3Pixmap = s3p;
    }
    QPixmap style4Pixmap;
    if(!QPixmapCache::find("visit_gui_linestyle4", style4Pixmap))
    {
        AugmentPixmap(style4);
        QPixmap s4p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linestyle4", s4p);
        style4Pixmap = s4p;
    }

    // Create the combo box and add the pixmaps to it.
    QHBoxLayout *topLayout = new QHBoxLayout(this);
    topLayout->setMargin(0);
    lineStyleComboBox = new QComboBox(this);
    lineStyleComboBox->addItem(QIcon(style1Pixmap), "solid");
    lineStyleComboBox->addItem(QIcon(style2Pixmap), "dash");
    lineStyleComboBox->addItem(QIcon(style3Pixmap), "dash/dot");
    lineStyleComboBox->addItem(QIcon(style4Pixmap), "dotted");
    lineStyleComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    lineStyleComboBox->setCurrentIndex(style);
    topLayout->addWidget(lineStyleComboBox);
    connect(lineStyleComboBox, SIGNAL(activated(int)),
            this, SIGNAL(lineStyleChanged(int)));
}
QvisLineWidthWidget::QvisLineWidthWidget(int width_, QWidget *parent) :
    QWidget(parent)
{
    // Create some pixmaps and store them in the application global
    // pixmap cache.
    QPixmap style1Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth1", style1Pixmap))
    {
        AugmentPixmap(style1);
        QPixmap s1p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth1", s1p);
        style1Pixmap = s1p;
    }
    QPixmap style2Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth2", style2Pixmap))
    {
        AugmentPixmap(style2);
        QPixmap s2p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth2", s2p);
        style2Pixmap = s2p;
    }
    QPixmap style3Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth3", style3Pixmap))
    {
        AugmentPixmap(style3);
        QPixmap s3p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth3", s3p);
        style3Pixmap = s3p;
    }
    QPixmap style4Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth4", style4Pixmap))
    {
        AugmentPixmap(style4);
        QPixmap s4p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth4", s4p);
        style4Pixmap = s4p;
    }
    QPixmap style5Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth5", style5Pixmap))
    {
        AugmentPixmap(style5);
        QPixmap s5p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth5", s5p);
        style5Pixmap = s5p;
    }
    QPixmap style6Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth6", style6Pixmap))
    {
        AugmentPixmap(style6);
        QPixmap s6p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth6", s6p);
        style6Pixmap = s6p;
    }
    QPixmap style7Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth7", style7Pixmap))
    {
        AugmentPixmap(style7);
        QPixmap s7p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth7", s7p);
        style7Pixmap = s7p;
    }
    QPixmap style8Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth8", style8Pixmap))
    {
        AugmentPixmap(style8);
        QPixmap s8p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth8", s8p);
        style8Pixmap = s8p;
    }
    QPixmap style9Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth9", style9Pixmap))
    {
        AugmentPixmap(style9);
        QPixmap s9p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth9", s9p);
        style9Pixmap = s9p;
    }
    QPixmap style10Pixmap;
    if(!QPixmapCache::find("visit_gui_linewidth10", style10Pixmap))
    {
        AugmentPixmap(style10);
        QPixmap s10p((const char **)augmentedData);
        QPixmapCache::insert("visit_gui_linewidth10", s10p);
        style10Pixmap = s10p;
    }

    // Create the combo box and add the pixmaps to it.
    QHBoxLayout *topLayout = new QHBoxLayout(this);
    topLayout->setMargin(0);
    topLayout->setSpacing(0);
    lineWidthComboBox = new QComboBox(this);
    lineWidthComboBox->addItem(QIcon(style1Pixmap),"1");
    lineWidthComboBox->addItem(QIcon(style2Pixmap),"2");
    lineWidthComboBox->addItem(QIcon(style3Pixmap),"3");
    lineWidthComboBox->addItem(QIcon(style4Pixmap),"4");
    lineWidthComboBox->addItem(QIcon(style5Pixmap),"5");
    lineWidthComboBox->addItem(QIcon(style6Pixmap),"6");
    lineWidthComboBox->addItem(QIcon(style7Pixmap),"7");
    lineWidthComboBox->addItem(QIcon(style8Pixmap),"8");
    lineWidthComboBox->addItem(QIcon(style9Pixmap),"9");
    lineWidthComboBox->addItem(QIcon(style10Pixmap),"10");
    lineWidthComboBox->setCurrentIndex(width_);
    topLayout->addWidget(lineWidthComboBox);
    connect(lineWidthComboBox, SIGNAL(activated(int)),
            this, SIGNAL(lineWidthChanged(int)));
}