• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setOpaque函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setOpaque函数的典型用法代码示例。如果您正苦于以下问题:C++ setOpaque函数的具体用法?C++ setOpaque怎么用?C++ setOpaque使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setOpaque函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: window

void QDirectFBWindowSurface::updateIsOpaque()
{
    const QWidget *win = window();
    Q_ASSERT(win);
    if (win->testAttribute(Qt::WA_OpaquePaintEvent) || win->testAttribute(Qt::WA_PaintOnScreen)) {
        setOpaque(true);
        return;
    }

    if (qFuzzyCompare(static_cast<float>(win->windowOpacity()), 1.0f)) {
        const QPalette &pal = win->palette();

        if (win->autoFillBackground()) {
            const QBrush &autoFillBrush = pal.brush(win->backgroundRole());
            if (autoFillBrush.style() != Qt::NoBrush && autoFillBrush.isOpaque()) {
                setOpaque(true);
                return;
            }
        }

        if (win->isWindow() && !win->testAttribute(Qt::WA_NoSystemBackground)) {
            const QBrush &windowBrush = win->palette().brush(QPalette::Window);
            if (windowBrush.style() != Qt::NoBrush && windowBrush.isOpaque()) {
                setOpaque(true);
                return;
            }
        }
    }
    setOpaque(false);
}
开发者ID:Blizzard,项目名称:qt4,代码行数:30,代码来源:qdirectfbwindowsurface.cpp


示例2: state

//==============================================================================
GuitarNeckComponent::GuitarNeckComponent (MidiKeyboardState& state_)
    : state (state_),
      xOffset (0),
      midiChannel (1),
      midiInChannelMask (0xffff),
      velocity (1.0f),
	  numStrings(6),
	  numFrets(24),
	  dotSize(13.f),
      rangeStart (0),
      rangeEnd (24),
      firstFret (0),
      mouseDragging (false),
      octaveNumForMiddleC (3)
{
	setNumFrets(24);
	setNumStrings(6);

	for (int i=0;i<maxStrings;i++) {
		stringNote[i] = -1;
		currentlyFrettedFret[i]=-1;
	}
	stringNote[0] = 64;
	stringNote[1] = 59;
	stringNote[2] = 55;
	stringNote[3] = 50;
	stringNote[4] = 45;
	stringNote[5] = 40;

    setOpaque (true);
    setWantsKeyboardFocus (false);
    state.addListener (this);
}
开发者ID:dennyabrain,项目名称:DISTRHO,代码行数:34,代码来源:GuitarNeckComponent.cpp


示例3: Component

BEGIN_JUCE_NAMESPACE

#include "juce_TooltipWindow.h"
#include "../windows/juce_ComponentPeer.h"
#include "../../../core/juce_Time.h"
#include "../../../threads/juce_Process.h"
#include "../lookandfeel/juce_LookAndFeel.h"
#include "../juce_Desktop.h"
#include "../mouse/juce_MouseInputSource.h"


//==============================================================================
TooltipWindow::TooltipWindow (Component* const parentComponent,
                              const int millisecondsBeforeTipAppears_)
    : Component ("tooltip"),
      millisecondsBeforeTipAppears (millisecondsBeforeTipAppears_),
      mouseClicks (0),
      lastHideTime (0),
      lastComponentUnderMouse (0),
      changedCompsSinceShown (true)
{
    if (Desktop::getInstance().getMainMouseSource().canHover())
        startTimer (123);

    setAlwaysOnTop (true);
    setOpaque (true);

    if (parentComponent != 0)
        parentComponent->addChildComponent (this);
}
开发者ID:Labmind,项目名称:GUI,代码行数:30,代码来源:juce_TooltipWindow.cpp


示例4: graph

//==============================================================================
GraphEditorPanel::GraphEditorPanel (FilterGraph& graph_)
    : graph (graph_),
      draggingConnector (nullptr)
{
    graph.addChangeListener (this);
    setOpaque (true);
}
开发者ID:furio,项目名称:pyplasm,代码行数:8,代码来源:GraphEditorPanel.cpp


示例5: host

//==============================================================================
GraphComponent::GraphComponent (HostFilterComponent* owner_)
    : host (0),
      owner (owner_),
      inputs (0),
      outputs (0),
      lassoComponent (0),
      currentClickedNode (0),
      currentFont (11.0f, Font::plain),
      defaultNodeWidth (50),
      defaultNodeHeight (50),
      leftToRight (true),
      somethingIsBeingDraggedOver (false),
      dragStartX (0),
      dragStartY (0)
{
    DBG ("GraphComponent::GraphComponent");

    setOpaque (true);
    //setBufferedToImage (true);
    setWantsKeyboardFocus (true);

    // setup config options
    leftToRight = Config::getInstance ()->graphLeftToRight;

    if (leftToRight)
    {
        defaultNodeWidth = JOST_GRAPH_NODE_HEIGHT;
        defaultNodeHeight = JOST_GRAPH_NODE_WIDTH;
    }
    else
    {
        defaultNodeWidth = JOST_GRAPH_NODE_WIDTH;
        defaultNodeHeight = JOST_GRAPH_NODE_HEIGHT;
    }
}
开发者ID:alessandropetrolati,项目名称:juced,代码行数:36,代码来源:GraphComponent.cpp


示例6: project

//==============================================================================
ProjectContentComponent::ProjectContentComponent()
    : project (nullptr),
      currentDocument (nullptr),
      sidebarTabs (TabbedButtonBar::TabsAtTop)
{
    setOpaque (true);
    setWantsKeyboardFocus (true);

    addAndMakeVisible (logo = new LogoComponent());
    addAndMakeVisible (header = new HeaderComponent());

    addAndMakeVisible (fileNameLabel = new Label());
    fileNameLabel->setJustificationType (Justification::centred);

    sidebarSizeConstrainer.setMinimumWidth (200);
    sidebarSizeConstrainer.setMaximumWidth (500);

    sidebarTabs.setOutline (0);
    sidebarTabs.getTabbedButtonBar().setMinimumTabScaleFactor (0.5);

    ProjucerApplication::getApp().openDocumentManager.addListener (this);

    Desktop::getInstance().addFocusChangeListener (this);
    startTimer (1600);
}
开发者ID:bacchus,项目名称:JUCE,代码行数:26,代码来源:jucer_ProjectContentComponent.cpp


示例7: setName

AverageMeter::AverageMeter(const String& componentName, int posX, int posY, int width, int CrestFactor, int nNumChannels, int segment_height)
{
    setName(componentName);

    // this component blends in with the background
    setOpaque(false);

    nInputChannels = nNumChannels;
    nCrestFactor = CrestFactor;

    nNumberOfBars = 8;
    nSegmentHeight = segment_height;
    nMeterPositionBottom = 21;
    nMeterHeight = nNumberOfBars * nSegmentHeight + 1;

    nPosX = posX;
    nPosY = posY;
    nWidth = width;
    nHeight = nMeterHeight + nMeterPositionBottom;

    int nPositionX = 0;
    LevelMeters = new MeterBarAverage*[nInputChannels];

    for (int nChannel = 0; nChannel < nInputChannels; nChannel++)
    {
        nPositionX = TraKmeter::TRAKMETER_LABEL_WIDTH + nChannel * (TraKmeter::TRAKMETER_SEGMENT_WIDTH + 6) - 3;

        LevelMeters[nChannel] = new MeterBarAverage("Level Meter Average #" + String(nChannel), nPositionX, 0, TraKmeter::TRAKMETER_SEGMENT_WIDTH, nNumberOfBars, nCrestFactor, nSegmentHeight, true);
        addAndMakeVisible(LevelMeters[nChannel]);
    }
}
开发者ID:Hoshino19680329,项目名称:traKmeter,代码行数:31,代码来源:average_meter.cpp


示例8: Component

BEGIN_JUCE_NAMESPACE

#include "jucetice_Joystick.h"
#include "../../text/juce_LocalisedStrings.h"
#include "../../gui/components/menus/juce_PopupMenu.h"


//==============================================================================
Joystick::Joystick()
  : Component (T("Joystick")),
    current_x (0),
    current_y (0),
    x_min (0),
    x_max (1),
    y_min (0),
    y_max (1),
    backgroundColour (Colours::black),
    sendChangeOnlyOnRelease (false),
    holdOnMouseRelease (false),
    isVelocityBased (false),
    menuEnabled (true),
    menuShown (false),
    mouseWasHidden (false),
    numDecimalPlaces (4)
{
    setOpaque (true);
    setWantsKeyboardFocus (true);

    calculateRatio();
    calculateSnapBack();
}
开发者ID:alessandropetrolati,项目名称:juced,代码行数:31,代码来源:jucetice_Joystick.cpp


示例9: AudioProcessorEditor

//==============================================================================
GenericAudioProcessorEditor::GenericAudioProcessorEditor (AudioProcessor* const owner_)
    : AudioProcessorEditor (owner_)
{
    jassert (owner_ != nullptr);
    setOpaque (true);

    addAndMakeVisible (&panel);

    Array <PropertyComponent*> params;

    const int numParams = owner_->getNumParameters();
    int totalHeight = 0;

    for (int i = 0; i < numParams; ++i)
    {
        String name (owner_->getParameterName (i));
        if (name.trim().isEmpty())
            name = "Unnamed";

        ProcessorParameterPropertyComp* const pc = new ProcessorParameterPropertyComp (name, *owner_, i);
        params.add (pc);
        totalHeight += pc->getPreferredHeight();
    }

    panel.addProperties (params);

    setSize (400, jlimit (25, 400, totalHeight));
}
开发者ID:rsenn,项目名称:vstsynth,代码行数:29,代码来源:juce_GenericAudioProcessorEditor.cpp


示例10: browser

WebBrowserComponent::WebBrowserComponent (const bool unloadPageWhenBrowserIsHidden_)
    : browser (nullptr),
      blankPageShown (false),
      unloadPageWhenBrowserIsHidden (unloadPageWhenBrowserIsHidden_)
{
    setOpaque (true);
}
开发者ID:AlessandroGiacomini,项目名称:pyplasm,代码行数:7,代码来源:juce_android_WebBrowserComponent.cpp


示例11: mMap

Viewport::Viewport():
    mMap(0),
    mMouseX(0),
    mMouseY(0),
    mPixelViewX(0.0f),
    mPixelViewY(0.0f),
    mDebugFlags(0),
    mPlayerFollowMouse(false),
    mLocalWalkTime(-1),
    mHoverBeing(0),
    mHoverItem(0)
{
    setOpaque(false);
    addMouseListener(this);

    mScrollLaziness = config.getIntValue("ScrollLaziness");
    mScrollRadius = config.getIntValue("ScrollRadius");
    mScrollCenterOffsetX = config.getIntValue("ScrollCenterOffsetX");
    mScrollCenterOffsetY = config.getIntValue("ScrollCenterOffsetY");

    mPopupMenu = new PopupMenu;
    mBeingPopup = new BeingPopup;

    setFocusable(true);

    listen(Event::ConfigChannel);
    listen(Event::ActorSpriteChannel);
}
开发者ID:mobilehub,项目名称:mana,代码行数:28,代码来源:viewport.cpp


示例12: state

//==============================================================================
MidiKeyboardComponent::MidiKeyboardComponent (MidiKeyboardState& state_,
                                              const Orientation orientation_)
    : state (state_),
      xOffset (0),
      blackNoteLength (1),
      keyWidth (16.0f),
      orientation (orientation_),
      midiChannel (1),
      midiInChannelMask (0xffff),
      velocity (1.0f),
      noteUnderMouse (-1),
      mouseDownNote (-1),
      rangeStart (0),
      rangeEnd (127),
      firstKey (12 * 4),
      canScroll (true),
      mouseDragging (false),
      useMousePositionForVelocity (true),
      keyMappingOctave (6),
      octaveNumForMiddleC (3)
{
    addChildComponent (scrollDown = new MidiKeyboardUpDownButton (*this, -1));
    addChildComponent (scrollUp   = new MidiKeyboardUpDownButton (*this, 1));

    // initialise with a default set of querty key-mappings..
    const char* const keymap = "awsedftgyhujkolp;";

    for (int i = String (keymap).length(); --i >= 0;)
        setKeyPressForNote (KeyPress (keymap[i], 0, 0), i);

    setOpaque (true);
    setWantsKeyboardFocus (true);

    state.addListener (this);
}
开发者ID:baeksanchang,项目名称:juce,代码行数:36,代码来源:juce_MidiKeyboardComponent.cpp


示例13: CustomComponentHolder

 CustomComponentHolder (Component* const customComp)
 {
     setVisible (true);
     setOpaque (true);
     addAndMakeVisible (customComp);
     setSize (jlimit (20, 800, customComp->getWidth()), customComp->getHeight());
 }
开发者ID:0x4d52,项目名称:ugen,代码行数:7,代码来源:juce_win32_FileChooser.cpp


示例14: MidiKeyboardUpDownButton

 MidiKeyboardUpDownButton (MidiKeyboardComponent& comp, const int d)
     : Button (String::empty),
       owner (comp),
       delta (d)
 {
     setOpaque (true);
 }
开发者ID:AndyBrown91,项目名称:JuceMonome,代码行数:7,代码来源:juce_MidiKeyboardComponent.cpp


示例15: MidiKeyboardUpDownButton

 MidiKeyboardUpDownButton (MidiKeyboardComponent& owner_, const int delta_)
     : Button (String::empty),
       owner (owner_),
       delta (delta_)
 {
     setOpaque (true);
 }
开发者ID:baeksanchang,项目名称:juce,代码行数:7,代码来源:juce_MidiKeyboardComponent.cpp


示例16: mTextColor

TextBox::TextBox() :
    mTextColor(&Theme::getThemeColor(Theme::TEXT))
{
    setOpaque(false);
    setFrameSize(0);
    mMinWidth = getWidth();
}
开发者ID:Evonline,项目名称:ManaPlus,代码行数:7,代码来源:textbox.cpp


示例17: status

TracktionMarketplaceUnlockForm::TracktionMarketplaceUnlockForm (TracktionMarketplaceStatus& s,
                                                                const String& userInstructions)
    : status (s),
      message (String(), userInstructions),
      passwordBox (String(), getDefaultPasswordChar()),
      registerButton (TRANS("Register")),
      cancelButton (TRANS ("Cancel"))
{
    // Please supply a message to tell your users what to do!
    jassert (userInstructions.isNotEmpty());

    setOpaque (true);

    emailBox.setText (status.getUserEmail());
    message.setJustificationType (Justification::centred);

    addAndMakeVisible (message);
    addAndMakeVisible (emailBox);
    addAndMakeVisible (passwordBox);
    addAndMakeVisible (registerButton);
    addAndMakeVisible (cancelButton);

    registerButton.addListener (this);
    cancelButton.addListener (this);

    lookAndFeelChanged();
    setSize (500, 250);
}
开发者ID:BrainDamage,项目名称:ambix,代码行数:28,代码来源:juce_TracktionMarketplaceUnlockForm.cpp


示例18: characterPortrait

CharacterModule::CharacterModule() : characterPortrait(NULL)
{
   characterStats = new gcn::contrib::AdjustingContainer();
   characterNameLabel = new edwt::Label();
   characterHPLabel = new edwt::Label();
   characterSPLabel = new edwt::Label();

   characterNameLabel->setForegroundColor(0xFFFFFF);
   characterHPLabel->setForegroundColor(0xFFFFFF);
   characterSPLabel->setForegroundColor(0xFFFFFF);

   characterPortrait = new edwt::Icon();

   characterStats->setNumberOfColumns(1);
   characterStats->setColumnAlignment(0, gcn::contrib::AdjustingContainer::LEFT);
   characterStats->add(characterNameLabel);
   characterStats->add(characterHPLabel);
   characterStats->add(characterSPLabel);
   characterStats->setOpaque(false);

   setNumberOfColumns(2);
   setColumnAlignment(0, gcn::contrib::AdjustingContainer::LEFT);
   setColumnAlignment(1, gcn::contrib::AdjustingContainer::RIGHT);
   setHorizontalSpacing(10);
   setPadding(5, 5, 5, 5);

   add(characterPortrait);
   add(characterStats);
   addMouseListener(this);
   setOpaque(false);
}
开发者ID:linwang,项目名称:EDEn,代码行数:31,代码来源:CharacterModule.cpp


示例19: ProgramAudioProcessorEditor

    ProgramAudioProcessorEditor (AudioProcessor* const p)
        : AudioProcessorEditor (p)
    {
        jassert (p != nullptr);
        setOpaque (true);

        addAndMakeVisible (panel);

        Array<PropertyComponent*> programs;

        const int numPrograms = p->getNumPrograms();
        int totalHeight = 0;

        for (int i = 0; i < numPrograms; ++i)
        {
            String name (p->getProgramName (i).trim());

            if (name.isEmpty())
                name = "Unnamed";

            ProcessorProgramPropertyComp* const pc = new ProcessorProgramPropertyComp (name, *p, i);
            programs.add (pc);
            totalHeight += pc->getPreferredHeight();
        }

        panel.addProperties (programs);

        setSize (400, jlimit (25, 400, totalHeight));
    }
开发者ID:jrlanglois,项目名称:JUCE,代码行数:29,代码来源:GraphEditorPanel.cpp


示例20: m_top

AudioOptions::AudioOptions(RootWidget * top) : gcn::Window("Audio"),
                                               m_top(top)
{
  gcn::Color base = getBaseColor();
  base.a = 128;
  setBaseColor(base);

  setOpaque(true);

  gcn::Box * vbox = new gcn::VBox(6);
  m_widgets.push_back(SPtr<gcn::Widget>(vbox));

  gcn::Box * hbox = new gcn::HBox(6);
  m_widgets.push_back(SPtr<gcn::Widget>(hbox));

  gcn::Button * b = new gcn::Button("Apply");
  m_widgets.push_back(SPtr<gcn::Widget>(b));
  b->setActionEventId("apply");
  b->setFocusable(false);
  b->addActionListener(this);
  hbox->pack(b);

  b = new gcn::Button("Close");
  m_widgets.push_back(SPtr<gcn::Widget>(b));
  b->setActionEventId("close");
  b->setFocusable(false);
  b->addActionListener(this);
  hbox->pack(b);

  vbox->pack(hbox);

  add(vbox);

  resizeToContent();
}
开发者ID:bsmr-worldforge,项目名称:sear,代码行数:35,代码来源:AudioOptions.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setOpen函数代码示例发布时间:2022-05-30
下一篇:
C++ setOpacity函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap