本文整理汇总了C++中setFrameShape函数的典型用法代码示例。如果您正苦于以下问题:C++ setFrameShape函数的具体用法?C++ setFrameShape怎么用?C++ setFrameShape使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setFrameShape函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QFrame
// ******************************************************************************************
// 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);
}
示例2: QFrame
LuminanceRangeWidget::LuminanceRangeWidget( QWidget *parent ):
QFrame( parent ), histogram( NULL ), histogramImage( NULL ),
showVP( false )
{
setFrameShape( QFrame::Box );
setMouseTracking( true );
minValue = -6;
maxValue = 8;
windowMin = 0;
windowMax = 2;
mouseDragStart = -1;
dragShift = 0;
}
示例3: app_
AppView::AppView(App& app)
: app_(app),
toolbar_(*this),
visibleAreaMode_(0),
lineMode_(scene_),
arrowMode_(scene_),
rectMode_(scene_),
currentMode_(visibleAreaMode_) {
setFrameShape(QFrame::NoFrame);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
reinitVisibleArea();
setScene(&scene_);
}
示例4: QAbstractScrollArea
TimelineBar::TimelineBar(ICaptureContext &ctx, QWidget *parent)
: QAbstractScrollArea(parent), m_Ctx(ctx)
{
m_Ctx.AddCaptureViewer(this);
setMouseTracking(true);
setFrameShape(NoFrame);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
QObject::connect(horizontalScrollBar(), &QScrollBar::valueChanged,
[this](int value) { m_pan = -value; });
setWindowTitle(tr("Timeline"));
}
示例5: connect
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 */
}
示例6: QLabel
DataMediaWidget::DataMediaWidget(IDataForms *ADataForms, const IDataMedia &AMedia, QWidget *AParent) : QLabel(AParent)
{
FMedia = AMedia;
FDataForms = ADataForms;
setTextFormat(Qt::PlainText);
setFrameShape(QLabel::Panel);
setFrameShadow(QLabel::Sunken);
connect(FDataForms->instance(),SIGNAL(urlLoaded(const QUrl &, const QByteArray &)),SLOT(onUrlLoaded(const QUrl &, const QByteArray &)));
connect(FDataForms->instance(),SIGNAL(urlLoadFailed(const QUrl &, const XmppError &)),SLOT(onUrlLoadFailed(const QUrl &, const XmppError &)));
FUriIndex = 0;
FLastError = XmppError(IERR_DATAFORMS_MEDIA_INVALID_TYPE);
QTimer::singleShot(0,this,SLOT(loadUri()));
}
示例7: QListWidget
SelectionListWidget::SelectionListWidget(QWidget *parent) : QListWidget(parent)
{
setAccessibleName(tr("Selection filter"));
setAccessibleDescription(tr("Use Tab and Backtab to move through the check boxes"));
setFrameShape(QFrame::NoFrame);
setSelectionMode(QAbstractItemView::SingleSelection);
setFocusPolicy(Qt::TabFocus);
setTabKeyNavigation(true);
for (int row = 0; row < numLabels; row++) {
QListWidgetItem *listItem = new QListWidgetItem(qApp->translate("selectionfilter", labels[row]),this);
listItem->setData(Qt::UserRole, QVariant(1 << row));
listItem->setData(Qt::AccessibleTextRole, qApp->translate("selectionfilter", labels[row]));
listItem->setCheckState(Qt::Unchecked);
addItem(listItem);
}
}
示例8: QListView
ClipboardBrowser::ClipboardBrowser(QWidget *parent, const ClipboardBrowserSharedPtr &sharedData)
: QListView(parent)
, m_itemLoader()
, m_tabName()
, m_lastFiltered(-1)
, m(this)
, d(this)
, m_invalidateCache(false)
, m_expireAfterEditing(false)
, m_editor(NULL)
, m_sharedData(sharedData ? sharedData : ClipboardBrowserSharedPtr(new ClipboardBrowserShared))
, m_loadButton(NULL)
, m_searchProgress(NULL)
, m_dragTargetRow(-1)
, m_dragStartPosition()
, m_spinLock(0)
, m_scrollSaver()
{
setLayoutMode(QListView::Batched);
setBatchSize(1);
setFrameShape(QFrame::NoFrame);
setTabKeyNavigation(false);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setWrapping(false);
setLayoutMode(QListView::SinglePass);
setEditTriggers(QAbstractItemView::NoEditTriggers);
setAlternatingRowColors(true);
initSingleShotTimer( &m_timerSave, 30000, this, SLOT(saveItems()) );
initSingleShotTimer( &m_timerScroll, 50 );
initSingleShotTimer( &m_timerUpdate, 10, this, SLOT(doUpdateCurrentPage()) );
initSingleShotTimer( &m_timerFilter, 10, this, SLOT(filterItems()) );
initSingleShotTimer( &m_timerExpire, 0, this, SLOT(expire()) );
// ScrollPerItem doesn't work well with hidden items
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
connect( verticalScrollBar(), SIGNAL(valueChanged(int)),
SLOT(updateCurrentPage()) );
setAttribute(Qt::WA_MacShowFocusRect, 0);
setAcceptDrops(true);
connectModelAndDelegate();
}
示例9: on_layerModelRemoved
void SlotInspectorSection::on_layerModelRemoved(const Process::LayerModel& removed)
{
// OPTIMIZEME
m_lmSection->removeAll();
auto frame = new QFrame{this};
m_lmGridLayout = new iscore::MarginLess<QGridLayout>{frame};
frame->setFrameShape(QFrame::StyledPanel);
for (const auto& lm : m_model.layers)
{
if (lm.id() != removed.id())
{
displayLayerModel(lm);
}
}
}
示例10: QGraphicsView
QgsComposerView::QgsComposerView( QWidget* parent, const char* name, Qt::WFlags f )
: QGraphicsView( parent )
, mRubberBandItem( 0 )
, mRubberBandLineItem( 0 )
, mMoveContentItem( 0 )
, mPaintingEnabled( true )
, mHorizontalRuler( 0 )
, mVerticalRuler( 0 )
{
Q_UNUSED( f );
Q_UNUSED( name );
setResizeAnchor( QGraphicsView::AnchorViewCenter );
setMouseTracking( true );
viewport()->setMouseTracking( true );
setFrameShape( QFrame::NoFrame );
}
示例11: QFrame
QgsMessageBar::QgsMessageBar( QWidget *parent )
: QFrame( parent ), mCurrentItem( NULL )
{
QPalette pal = palette();
pal.setBrush( backgroundRole(), pal.window() );
setPalette( pal );
setAutoFillBackground( true );
setFrameShape( QFrame::StyledPanel );
setFrameShadow( QFrame::Plain );
mLayout = new QGridLayout( this );
mLayout->setContentsMargins( 9, 1, 9, 1 );
setLayout( mLayout );
mItemCount = new QLabel( this );
mItemCount->setObjectName( "mItemCount" );
mItemCount->setToolTip( tr( "Remaining messages" ) );
mItemCount->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred );
mLayout->addWidget( mItemCount, 0, 1, 1, 1 );
mCloseMenu = new QMenu( this );
mCloseMenu->setObjectName( "mCloseMenu" );
mActionCloseAll = new QAction( tr( "Close all" ), this );
mCloseMenu->addAction( mActionCloseAll );
connect( mActionCloseAll, SIGNAL( triggered() ), this, SLOT( clearWidgets() ) );
mCloseBtn = new QToolButton( this );
mCloseBtn->setToolTip( tr( "Close" ) );
mCloseBtn->setMinimumWidth( 36 );
mCloseBtn->setStyleSheet(
"QToolButton { background-color: rgba(255, 255, 255, 0); } "
"QToolButton::menu-indicator { subcontrol-position: right bottom; subcontrol-origin: padding; bottom: 6px; }" );
mCloseBtn->setCursor( Qt::PointingHandCursor );
mCloseBtn->setIcon( QgsApplication::getThemeIcon( "/mIconClose.png" ) );
mCloseBtn->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred );
mCloseBtn->setMenu( mCloseMenu );
connect( mCloseBtn, SIGNAL( clicked() ), this, SLOT( popWidget() ) );
mLayout->addWidget( mCloseBtn, 0, 2, 1, 1 );
connect( this, SIGNAL( widgetAdded( QWidget* ) ), this, SLOT( updateItemCount() ) );
connect( this, SIGNAL( widgetRemoved( QWidget* ) ), this, SLOT( updateItemCount() ) );
// start hidden
setVisible( false );
}
示例12: LoopItemView
void LoopLibraryDialog::newItem( const AddToModelEnum & addToModelEnum,
const QString & detailedText,
const QPixmap & pixmap )
{
auto itemView = new LoopItemView( addToModelEnum,
detailedText,
pixmap );
connect(itemView, &LoopItemView::addToModelClicked, this, &LoopLibraryDialog::onAddToModelClicked);
m_scrollArea->widget()->layout()->addWidget(itemView);
auto divider = new QFrame();
divider->setFrameShape(QFrame::HLine);
divider->setFrameShadow(QFrame::Sunken);
m_scrollArea->widget()->layout()->addWidget(divider);
}
示例13: fnt
ClickLabel::ClickLabel(QWidget *parent)
:QLabel(parent)
{
QFont fnt( font() );
fnt.setBold(true);
setFont( fnt );
setFrameShape( QLabel::Panel );
setFrameShadow( QLabel::Sunken );
setAlignment( Qt::AlignCenter );
setToolTip( tr("Double click for details") );
setAutoFillBackground(true);
QPalette pal = palette();
QColor col = QColor(0xff, 0xff, 0xff);
pal.setColor(QPalette::Normal, QPalette::Window, col );
pal.setColor(QPalette::Inactive, QPalette::Window, col );
setPalette( pal );
}
示例14: QGraphicsView
InboxButtonView::InboxButtonView(QWidget* parent)
: QGraphicsView(parent), m_usedWidth(0)
{
setMinimumHeight( 24 );
setMaximumHeight( minimumHeight() );
setFrameShape(QFrame::NoFrame);
setFrameShadow(QFrame::Plain);
setLineWidth(0);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setInteractive(true);
setAttribute(Qt::WA_Hover, true);
setAlignment(Qt::AlignLeft | Qt::AlignTop);
m_scene = new QGraphicsScene(this);
setScene( m_scene );
}
示例15: AbstractController
/*
* The special controller with drag'n drop abilities.
* We don't do this in the main controller, since we don't want the OverHead
* to propagate there too
*/
DroppingController::DroppingController( intf_thread_t *_p_intf,
const QString& line,
QWidget *_parent )
: AbstractController( _p_intf, _parent )
{
RTL_UNAFFECTED_WIDGET
rubberband = NULL;
b_draging = false;
setAcceptDrops( true );
controlLayout = new QHBoxLayout( this );
controlLayout->setSpacing( 5 );
controlLayout->setMargin( 0 );
setFrameShape( QFrame::StyledPanel );
setFrameShadow( QFrame::Raised );
setMinimumHeight( 20 );
parseAndCreate( line, controlLayout );
}