当前位置: 首页>>代码示例>>C++>>正文


C++ setFrameShape函数代码示例

本文整理汇总了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);
}
开发者ID:ngtienthanh,项目名称:crops-moveit,代码行数:49,代码来源:start_screen_widget.cpp

示例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;
  
}
开发者ID:TriggerHappyRemote,项目名称:TriggerHappyRemote-iOS,代码行数:17,代码来源:luminancerange_widget.cpp

示例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_);
}
开发者ID:dsimakov,项目名称:screenshotgun,代码行数:17,代码来源:AppView.cpp

示例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"));
}
开发者ID:etnlGD,项目名称:renderdoc,代码行数:17,代码来源:TimelineBar.cpp

示例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 */
}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:17,代码来源:QIListView.cpp

示例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()));
}
开发者ID:Nikoli,项目名称:vacuum-im,代码行数:17,代码来源:datamediawidget.cpp

示例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);
            }
      }
开发者ID:FryderykChopin,项目名称:MuseScore,代码行数:17,代码来源:selectionwindow.cpp

示例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();
}
开发者ID:se7entime,项目名称:CopyQ,代码行数:46,代码来源:clipboardbrowser.cpp

示例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);
        }
    }
}
开发者ID:himito,项目名称:i-score,代码行数:17,代码来源:SlotInspectorSection.cpp

示例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 );
}
开发者ID:andreasmitrou,项目名称:QGIS,代码行数:17,代码来源:qgscomposerview.cpp

示例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 );
}
开发者ID:lordi,项目名称:Quantum-GIS,代码行数:45,代码来源:qgsmessagebar.cpp

示例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);
}
开发者ID:NREL,项目名称:OpenStudio,代码行数:18,代码来源:LoopLibraryDialog.cpp

示例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 );
}
开发者ID:J-Javan,项目名称:xca,代码行数:18,代码来源:clicklabel.cpp

示例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 );
}
开发者ID:Narsil,项目名称:QWave,代码行数:18,代码来源:inboxbuttonview.cpp

示例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 );
}
开发者ID:videolan,项目名称:vlc,代码行数:23,代码来源:toolbar.cpp


注:本文中的setFrameShape函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。