int main(void) { static const struct st3 a = {1, 2, 3, 4, 5, 6}; l1(100); l2(100, 200); l3(100, 200, 300); l4(100, 200, 300, 400); l5(100, 200, 300, 400, 500); l6(100, 200, 300, 400, 500, 600); l7(100, 200, 300, 400, 500, 600, 700); l8(100, 200, 300, 400, 500, 600, 700, 800); d1(); d2(43); d3(100, 200); d4(a); d5('a', 43, a); d6('a', 1); c1(44); c2(100, 'a', 3.4); c3(200, 2.777, 'q'); c4(200, 1); c5(1.1, 2.2); c6(1.23, 45.6); c7('z', 0x200); a1('a'); a2(10); a3(20); a4(102030405060LL); b1('a', 20); b2(30, 'b'); b3(10, 20, 30, 40, 50, 60); s1(sx); s1p(&sx); s2(sy); s3(sz); s4(sq); s5(sa); s6(sb); r1(); r3(); r4(); q1(200, sx); q2(300, 't', sx); q3(400, 410, sy); q4(500, 510, sq); q5(600, 610, 'z', 'q', sq); real1("fresh air"); real2(); return 0; }
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))); }