TSeparator::TSeparator(Qt::Orientation orientation, QWidget* parent) : QFrame(parent) { setLineWidth(1); setMidLineWidth(0); setOrientation(orientation); }
RankingArea::RankingArea() { setFrameStyle( QFrame::Box | QFrame::Raised ); setMidLineWidth( 2 ); setMinimumSize( 80, 80 ); }
MainWin::MainWin() { int i; xMap.setScaleInterval( -0.5, 10.5 ); yMap.setScaleInterval( -1.1, 1.1 ); // // Frame style // setFrameStyle( QFrame::Box | QFrame::Raised ); setLineWidth( 2 ); setMidLineWidth( 3 ); // // Calculate values // for( i = 0; i < Size; i++ ) { xval[i] = double( i ) * 10.0 / double( Size - 1 ); yval[i] = qSin( xval[i] ) * qCos( 2.0 * xval[i] ); } curve.setRawSamples( xval, yval, Size ); }
/** Slot appelé lors de click de case **/ void Case::deminage(){ if(!hasCase || black) return; hasCase = false; thirdMark = false; setLineWidth(1); setMidLineWidth(0); setFrameShape(QFrame::Panel); setFrameShadow(QFrame::Sunken); label->setText(showValue(value)); if(flag && notMine()){ emit signalCaseFlag(false); } else{ emit signalDemine(); if(value >= 9){ label->setText(showValue(value, QString("red"), QString("black"))); emit signalGameOver(false); } else if(value == 0){ emit signalDemineAroundCase(x, y); } } }
KSeparator::KSeparator( int orientation, QWidget* parent, const char* name, WFlags f ) : QFrame( parent, name, f ) { setLineWidth( 1 ); setMidLineWidth( 0 ); setOrientation( orientation ); }
KPopupFrame::KPopupFrame(QWidget* parent, const char* name) : QFrame(parent, name, WType_Popup), result(0), // rejected main(0) { setFrameStyle(QFrame::Box|QFrame::Raised); setMidLineWidth(2); }
GpsElevationAzimuthDisplay::GpsElevationAzimuthDisplay(QWidget *parent) : QFrame(parent), width(0), height(0) { setFrameStyle(StyledPanel | QFrame::Plain); setLineWidth(2); setMidLineWidth(2); }
LocationBarPopup::LocationBarPopup(QWidget* parent) : QFrame(parent, Qt::Popup) , m_alignment(Qt::AlignRight) { setAttribute(Qt::WA_DeleteOnClose); setFrameStyle(QFrame::StyledPanel | QFrame::Raised); setLineWidth(1); setMidLineWidth(2); }
RDMarkerBar::RDMarkerBar(QWidget *parent) : QLabel(parent) { for(int i=0;i<RDMarkerBar::MaxSize;i++) { marker_pos[i]=0; } setLineWidth(1); setMidLineWidth(0); setFrameStyle(Q3Frame::Box|Q3Frame::Plain); }
MarkerBar::MarkerBar(QWidget *parent,const char *name) : QLabel(parent,name) { for(int i=0;i<MarkerBar::MaxSize;i++) { marker_pos[i]=0; } setLineWidth(1); setMidLineWidth(0); setFrameStyle(QFrame::Box|QFrame::Plain); }
CardViewTip( QWidget *parent = 0, const char *name = 0 ) : QLabel( parent ) { setObjectName( name ); setAutoFillBackground( true ); setPalette( QToolTip::palette() ); setFrameStyle( Panel | Plain ); setMidLineWidth( 0 ); setIndent( 1 ); }
int QwtPlotGLCanvas::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QGLWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 2) qt_static_metacall(this, _c, _id, _a); _id -= 2; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 2) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 2; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< Shadow*>(_v) = frameShadow(); break; case 1: *reinterpret_cast< Shape*>(_v) = frameShape(); break; case 2: *reinterpret_cast< int*>(_v) = lineWidth(); break; case 3: *reinterpret_cast< int*>(_v) = midLineWidth(); break; case 4: *reinterpret_cast< int*>(_v) = frameWidth(); break; case 5: *reinterpret_cast< QRect*>(_v) = frameRect(); break; } _id -= 6; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setFrameShadow(*reinterpret_cast< Shadow*>(_v)); break; case 1: setFrameShape(*reinterpret_cast< Shape*>(_v)); break; case 2: setLineWidth(*reinterpret_cast< int*>(_v)); break; case 3: setMidLineWidth(*reinterpret_cast< int*>(_v)); break; } _id -= 6; } else if (_c == QMetaObject::ResetProperty) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 6; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 6) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 6; } #endif // QT_NO_PROPERTIES return _id; }
TempoLabel::TempoLabel(QWidget* parent) : QLabel(parent) { setFrameStyle(WinPanel | Sunken); setLineWidth(2); setMidLineWidth(3); _value = 1.0; setValue(0.0); setIndent(3); setMinimumSize(sizeHint()); }
GpsSnrDisplay::GpsSnrDisplay(QWidget *parent) : QFrame(parent), width(0), height(0), xoff(0), yoff(0) { setFrameStyle(StyledPanel | QFrame::Plain); setLineWidth(2); setMidLineWidth(2); }
void Case::reset(){ hasCase = true; flag = false; thirdMark = false; label->setText(" "); setLineWidth(0); setMidLineWidth(1); setFrameShape(QFrame::WinPanel); setFrameShadow(QFrame::Raised); show(); }
MirrorWidget::MirrorWidget(QPixmap *s, bool *game, bool *pause, QWidget *parent, const char *name) : QFrame(parent, name) { in_game = game; in_pause = pause; sprites = s; setFrameStyle(QFrame::Box | QFrame::Raised); setLineWidth(2); setMidLineWidth(1); resize(scr_width * sprite_width + 10, sprite_height + 10); }
CrChainView::CrChainView(EffectKeeper* effectKeeper, QWidget *parent, const char *name ) : Q3Frame(parent,name), m_effectKeeper(effectKeeper), m_threadEffector(0), m_chainButtonArray(0), m_sizeHint(100,25) { setBackgroundMode(Qt::PaletteMid); setFrameStyle(Q3Frame::Box | Q3Frame::Raised); setLineWidth(1); setMidLineWidth(1); setMargin(0); m_chainButtonList.setAutoDelete(false); }
NextWidget::NextWidget() { int border; nextBlock = 0; setFrameStyle(QFrame::Box | QFrame::Raised); setLineWidth(4); setMidLineWidth(3); border = 4 * lineWidth() + 2 * midLineWidth(); setFixedSize(120 + border, 80 + border); }
PitchLabel::PitchLabel(QWidget* parent) : QLabel(parent) { _pitchMode = true; _value = -1; setFrameStyle(WinPanel | Sunken); setLineWidth(2); setMidLineWidth(3); setValue(0); int fw = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); setIndent(fw); }
MetronomeBar::MetronomeBar(QWidget *parent) : QFrame(parent) { setFrameStyle(QFrame::Panel | QFrame::Plain); setLineWidth(1); setMidLineWidth(1); QPalette newPalette = palette(); newPalette.setColor(QPalette::WindowText, Qt::darkBlue); setPalette(newPalette); reset(); }
void Case::afficheMine(){ if(!hasCase) return; hasCase = false; setLineWidth(1); setMidLineWidth(0); /*setFrameShape(QFrame::Panel); setFrameShadow(QFrame::Plain);*/ setFrameShape(QFrame::Panel); setFrameShadow(QFrame::Sunken); label->setText(showValue(value)); }
ListLayoutRow::ListLayoutRow(QWidget *widget, QWidget *parent, const bool &moveEnabled) : QFrame(parent) { m_widget = widget; m_upButton = m_downButton = 0; setMidLineWidth(0); setLineWidth(1); setFrameStyle(QFrame::Box); setFrameShadow(QFrame::Sunken); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QToolButton *removeButton = new QToolButton(this); removeButton->setIcon(KIcon("list-remove")); removeButton->setText(i18n("Remove")); removeButton->setToolTip(i18n("Remove")); connect(removeButton, SIGNAL(clicked()), this, SLOT(removeClicked())); KSeparator *separator = new KSeparator(Qt::Vertical); QHBoxLayout *layout = new QHBoxLayout; if (moveEnabled) { QToolButton *upButton = new QToolButton(this); upButton->setIcon(KIcon("go-up")); upButton->setText(i18n("Move up")); upButton->setToolTip(i18n("Move up")); QToolButton *downButton = new QToolButton(this); downButton->setIcon(KIcon("go-down")); downButton->setText(i18n("Move down")); downButton->setToolTip(i18n("Move down")); connect(upButton, SIGNAL(clicked()), this, SLOT(upClicked())); connect(downButton, SIGNAL(clicked()), this, SLOT(downClicked())); layout->addWidget(upButton); layout->addWidget(downButton); m_upButton = upButton; m_downButton = downButton; } layout->addWidget(removeButton); layout->addWidget(separator); layout->addWidget(m_widget); setLayout(layout); }
ChunkBar::ChunkBar(QWidget* parent) : QFrame(parent) { setFrameShape(StyledPanel); setFrameShadow(Sunken); setLineWidth(3); setMidLineWidth(3); InitializeToolTipImages(this); setToolTip(i18n("<img src=\"available_color\"> - Downloaded Chunks<br>" "<img src=\"unavailable_color\"> - Chunks to Download<br>" "<img src=\"excluded_color\"> - Excluded Chunks")); }
RSSDetectionWidget::RSSDetectionWidget(WebView* view, QWidget* parent) : QFrame(parent, Qt::Popup) , view_(view) { setAttribute(Qt::WA_DeleteOnClose); setFrameStyle(QFrame::StyledPanel | QFrame::Plain); setLineWidth(1); setMidLineWidth(2); gridLayout_ = new QGridLayout(this); gridLayout_->setMargin(5); gridLayout_->setSpacing(5); QWebFrame* frame = view_->page()->mainFrame(); QWebElementCollection links = frame->findAllElements("link[type=\"application/rss+xml\"]"); int cols = links.count() / 10 == 0 ? 1 : links.count() / 10; int row = 0; for (int i = 0; i < links.count(); i++) { QWebElement element = links.at(i); QString title = element.attribute("title"); const QUrl url = QUrl::fromEncoded(element.attribute("href").toUtf8()); if (url.isEmpty()) { continue; } if (title.isEmpty()) { title = tr("Untitled feed"); } QPushButton* button = new QPushButton(this); button->setStyleSheet("QPushButton {text-align:left; border: none; padding: 0px;}" "QPushButton:hover {color: #1155CC;}"); button->setCursor(Qt::PointingHandCursor); button->setText(title); button->setToolTip(url.toString()); button->setProperty("rss-url", url); button->setProperty("rss-title", title); int pos = i % cols > 0 ? (i % cols) * 2 : 0; gridLayout_->addWidget(button, row, pos); connect(button, SIGNAL(clicked()), this, SLOT(addRss())); if (i % cols == cols - 1) { row++; } } }
// ****************************************************************************************** // Create the widget // ****************************************************************************************** LoadPathWidget::LoadPathWidget( const std::string &title, const std::string &instructions, const bool dir_only, const bool load_only, QWidget* parent ) : QFrame(parent), dir_only_(dir_only), load_only_(load_only) { // Set frame graphics setFrameShape(QFrame::StyledPanel); setFrameShadow(QFrame::Raised); setLineWidth(1); setMidLineWidth(0); // Basic widget container QVBoxLayout *layout = new QVBoxLayout(this); // Horizontal layout splitter QHBoxLayout *hlayout = new QHBoxLayout(); // Widget Title QLabel * widget_title = new QLabel(this); widget_title->setText( title.c_str() ); QFont widget_title_font( "Arial", 12, QFont::Bold ); widget_title->setFont(widget_title_font); layout->addWidget( widget_title); layout->setAlignment( widget_title, Qt::AlignTop); // Widget Instructions QLabel * widget_instructions = new QLabel(this); widget_instructions->setText( instructions.c_str() ); widget_instructions->setWordWrap(true); widget_instructions->setTextFormat( Qt::RichText ); layout->addWidget( widget_instructions); layout->setAlignment( widget_instructions, Qt::AlignTop); // Line Edit path_box_ = new QLineEdit(this); hlayout->addWidget(path_box_); // Button QPushButton *browse_button = new QPushButton(this); browse_button->setText("Browse"); connect( browse_button, SIGNAL( clicked() ), this, SLOT( btn_file_dialog() ) ); hlayout->addWidget(browse_button); // Add horizontal layer to verticle layer layout->addLayout(hlayout); setLayout(layout); }
QIListView::QIListView (QWidget *aParent /* = 0 */) :QListView (aParent) { /* Track if the application lost the focus */ #if MAC_LEOPARD_STYLE connect (QCoreApplication::instance(), SIGNAL (focusChanged (QWidget *, QWidget *)), this, SLOT (focusChanged (QWidget *, QWidget *))); /* 1 pixel line frame */ setMidLineWidth (1); setLineWidth (0); setFrameShape (QFrame::Box); focusChanged (NULL, qApp->focusWidget()); /* Nesty hack to disable the focus rect on the list view. This interface * may change at any time! */ static_cast<QMacStyle *> (style())->setFocusRectPolicy (this, QMacStyle::FocusDisabled); #endif /* MAC_LEOPARD_STYLE */ }
PianoView::PianoView() : QGraphicsView() { setFrameStyle(QFrame::NoFrame); setLineWidth(0); setMidLineWidth(0); setScene(new QGraphicsScene); setTransformationAnchor(QGraphicsView::AnchorUnderMouse); setResizeAnchor(QGraphicsView::AnchorUnderMouse); setMouseTracking(true); setRubberBandSelectionMode(Qt::IntersectsItemBoundingRect); setDragMode(QGraphicsView::RubberBandDrag); _timeType = TType::TICKS; magStep = 0; staff = 0; chord = 0; }
// ****************************************************************************************** // Create the widget // ****************************************************************************************** SelectModeWidget::SelectModeWidget( QWidget* parent ) : QFrame(parent) { // Set frame graphics setFrameShape(QFrame::StyledPanel); setFrameShadow(QFrame::Raised); setLineWidth(1); setMidLineWidth(0); // Basic widget container QVBoxLayout *layout = new QVBoxLayout(this); // Horizontal layout splitter QHBoxLayout *hlayout = new QHBoxLayout(); // Widget Title QLabel * widget_title = new QLabel(this); widget_title->setText( "Choose mode:" ); QFont widget_title_font( "Arial", 12, QFont::Bold ); widget_title->setFont(widget_title_font); layout->addWidget( widget_title); layout->setAlignment( widget_title, Qt::AlignTop); // Widget Instructions QLabel * widget_instructions = new QLabel(this); widget_instructions->setText( "All settings for MoveIt are stored in a Moveit configuration package. Here you have the option to create a new configuration package, or load an existing one. Note: any changes to a MoveIt configuration package outside this setup assistant will likely be overwritten by this tool." ); widget_instructions->setWordWrap(true); //widget_instructions->setMinimumWidth(1); widget_instructions->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); layout->addWidget( widget_instructions); layout->setAlignment( widget_instructions, Qt::AlignTop); // New Button btn_new_ = new QPushButton(this); btn_new_->setText("Create &New MoveIt\nConfiguration Package"); hlayout->addWidget( btn_new_ ); // Exist Button btn_exist_ = new QPushButton(this); btn_exist_->setText("&Edit Existing MoveIt\nConfiguration Package"); hlayout->addWidget( btn_exist_ ); // Add horizontal layer to verticle layer layout->addLayout(hlayout); setLayout(layout); }
int QFrame::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< Shape*>(_v) = frameShape(); break; case 1: *reinterpret_cast< Shadow*>(_v) = frameShadow(); break; case 2: *reinterpret_cast< int*>(_v) = lineWidth(); break; case 3: *reinterpret_cast< int*>(_v) = midLineWidth(); break; case 4: *reinterpret_cast< int*>(_v) = frameWidth(); break; case 5: *reinterpret_cast< QRect*>(_v) = frameRect(); break; } _id -= 6; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setFrameShape(*reinterpret_cast< Shape*>(_v)); break; case 1: setFrameShadow(*reinterpret_cast< Shadow*>(_v)); break; case 2: setLineWidth(*reinterpret_cast< int*>(_v)); break; case 3: setMidLineWidth(*reinterpret_cast< int*>(_v)); break; case 5: setFrameRect(*reinterpret_cast< QRect*>(_v)); break; } _id -= 6; } else if (_c == QMetaObject::ResetProperty) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 6; } #endif // QT_NO_PROPERTIES return _id; }
Case::Case(int i, int j, int val, AbstractPlateau *pParent) : QFrame(pParent) { setObjectName("case"); parent = pParent; x = i; y = j; value = val; setGeometry(x*TAILLE_CASE+OFFSET_BORDURE_P, y*TAILLE_CASE+OFFSET_BORDURE_P, TAILLE_CASE, TAILLE_CASE); setLineWidth(0); setMidLineWidth(1); setFrameShape(QFrame::WinPanel); setFrameShadow(QFrame::Raised); label = new QLabel(" ", this); hasCase = true; flag = false; thirdMark = false; black = false; installEventFilter(this); }