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

C++ resized函数代码示例

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

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



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

示例1: width

void Window::resizeEvent(QResizeEvent *e) {
	title->setGeometry(QRect(0, 0, width(), st::titleHeight + st::titleShadow));
	if (layerBG) layerBG->resize(width(), height());
	if (_connecting) _connecting->setGeometry(0, height() - _connecting->height(), _connecting->width(), _connecting->height());
	emit resized(QSize(width(), height() - st::titleHeight));
}
开发者ID:Samuel0Paul,项目名称:tdesktop,代码行数:6,代码来源:window.cpp


示例2: resized

Result VideoComponent::load (const File& file)
{
    Result r = pimpl->load (file);
    resized();
    return r;
}
开发者ID:Ixox,项目名称:preenfm2Controller,代码行数:6,代码来源:juce_VideoComponent.cpp


示例3: resized

//==============================================================================
void TabbedComponent::setOrientation (const TabbedButtonBar::Orientation orientation)
{
    tabs->setOrientation (orientation);
    resized();
}
开发者ID:sonic59,项目名称:JuceEditor,代码行数:6,代码来源:juce_TabbedComponent.cpp


示例4: resized

void TabbedButtonBar::lookAndFeelChanged()
{
    extraTabsButton = nullptr;
    resized();
}
开发者ID:sonic59,项目名称:JuceS1Text,代码行数:5,代码来源:juce_TabbedButtonBar.cpp


示例5: resized

void StylesComboPreview::resizeEvent( QResizeEvent * ev )
{
    QLineEdit::resizeEvent(ev);
    emit resized();
    updateAddButton();
}
开发者ID:woylaski,项目名称:kexi,代码行数:6,代码来源:StylesComboPreview.cpp


示例6: resized

//-------------------------------------------------------------------------
void QGuidoItemContainer::resize( float xScale , float yScale )
{
	resized( QRectF( 0, 0, xScale * rect().width() , yScale * rect().height()) );
}
开发者ID:EQ4,项目名称:guido-engine,代码行数:5,代码来源:QGuidoItemContainer.cpp


示例7: showDemo

 //==============================================================================
 void showDemo (Component* demoComp)
 {
     currentDemo = demoComp;
     addAndMakeVisible (currentDemo);
     resized();
 }
开发者ID:Crazybond,项目名称:JUCE,代码行数:7,代码来源:MainDemoWindow.cpp


示例8: resized

void Main::resizeEvent(QResizeEvent *e)
{
    emit resized();
}
开发者ID:dyfet,项目名称:coastal-qt,代码行数:4,代码来源:main.cpp


示例9: CoastalMain


//.........这里部分代码省略.........

    QWidget *toolbar = extendToolbar(ui.toolBar);
    tb.setupUi(toolbar);

    QSettings settings;
    resize(settings.value("size", QSize(760, 540)).toSize());

#ifdef Q_OS_WIN
    const char *separator = ";";
    QString manpath = settings.value("manpath").toString();
    if(manpath.isEmpty())
        manpath = "C:\\tools\\man";
#else
    const char *separator = ":";
    QString manpath = getenv("MANPATH");
    if(manpath.isEmpty())
        manpath = settings.value("manpath").toString();

    if(manpath.isEmpty())
        manpath = "/usr/share/man:/usr/local/share/man";
#endif

    manpaths = manpath.split(separator, QString::SkipEmptyParts);

    sections[0] = ui.actionSection1;
    sections[1] = ui.actionSection2;
    sections[2] = ui.actionSection3;
    sections[3] = ui.actionSection4;
    sections[4] = ui.actionSection5;
    sections[5] = ui.actionSection6;
    sections[6] = ui.actionSection7;
    sections[7] = ui.actionSection8;
    sections[8] = ui.actionSectionl;
    sections[9] = ui.actionSectionn;

    settings.beginGroup("Sections");
    ui.actionSection1->setChecked(settings.value("1", ui.actionSection1->isChecked()).toBool());
    ui.actionSection2->setChecked(settings.value("2", ui.actionSection2->isChecked()).toBool());
    ui.actionSection3->setChecked(settings.value("3", ui.actionSection3->isChecked()).toBool());
    ui.actionSection4->setChecked(settings.value("4", ui.actionSection4->isChecked()).toBool());
    ui.actionSection5->setChecked(settings.value("5", ui.actionSection5->isChecked()).toBool());
    ui.actionSection6->setChecked(settings.value("6", ui.actionSection6->isChecked()).toBool());
    ui.actionSection7->setChecked(settings.value("7", ui.actionSection7->isChecked()).toBool());
    ui.actionSection8->setChecked(settings.value("8", ui.actionSection8->isChecked()).toBool());
    ui.actionSectionl->setChecked(settings.value("l", ui.actionSectionl->isChecked()).toBool());
    ui.actionSectionn->setChecked(settings.value("n", ui.actionSectionn->isChecked()).toBool());
    settings.endGroup();

    searchGroup = new QActionGroup(this);
    ui.actionIndex->setActionGroup(searchGroup);
    ui.actionKeywords->setActionGroup(searchGroup);

    ui.indexView->setEnabled(false);
    ui.indexView->setShowGrid(false);
    ui.indexView->setSortingEnabled(false);
    ui.indexView->setSelectionBehavior(QAbstractItemView::SelectRows);
    ui.indexView->setEditTriggers(QAbstractItemView::NoEditTriggers);
    ui.indexView->setSelectionMode(QAbstractItemView::SingleSelection);
    ui.indexView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    ui.indexView->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(ui.indexView, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(open(const QPoint&)));

    // menu action signals

    connect(ui.actionOptions, SIGNAL(triggered()), this, SLOT(options()));
    connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(about()));
    connect(ui.actionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
    connect(ui.actionReload, SIGNAL(triggered()), this, SLOT(reload()));
    connect(ui.actionSupport, SIGNAL(triggered()), this, SLOT(support()));

    connect(ui.actionAll, SIGNAL(triggered()), this, SLOT(all()));
    connect(ui.actionClear, SIGNAL(triggered()), this, SLOT(clear()));

    for(unsigned pos = 0; pos < 10; ++pos)
        connect(sections[pos], SIGNAL(triggered()), this, SLOT(reload()));

    // input validation

    tb.searchBox->setValidator(index_validator);

    // forms, tabs, and view signals

    connect(tb.searchBox, SIGNAL(editTextChanged(const QString&)), this, SLOT(search(const QString&)));
    connect(tb.searchBox, SIGNAL(activated(const QString&)), this, SLOT(load(const QString&)));
    connect(ui.tabs, SIGNAL(tabCloseRequested(int)), this, SLOT(close(int)));
    connect(ui.indexView, SIGNAL(activated(const QModelIndex&)), this, SLOT(load(const QModelIndex&)));
    connect(ui.actionView, SIGNAL(triggered()), this, SLOT(view()));
    connect(ui.actionOpen, SIGNAL(triggered()), this, SLOT(open()));

    // application signals

    connect(this, SIGNAL(resized()), this, SLOT(columns()));
    connect(this, SIGNAL(startup()), this, SLOT(reload()), Qt::QueuedConnection);

    setContextMenuPolicy(Qt::CustomContextMenu);
    connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(menu(const QPoint&)));

    emit startup();
}
开发者ID:dyfet,项目名称:coastal-qt,代码行数:101,代码来源:main.cpp


示例10: dw

bool MultiDocumentPanel::closeDocument (Component* component,
                                        const bool checkItsOkToCloseFirst)
{
    if (components.contains (component))
    {
        if (checkItsOkToCloseFirst && ! tryToCloseDocument (component))
            return false;

        component->removeComponentListener (this);

        const bool shouldDelete = MultiDocHelpers::shouldDeleteComp (component);
        component->getProperties().remove ("mdiDocumentDelete_");
        component->getProperties().remove ("mdiDocumentBkg_");

        if (mode == FloatingWindows)
        {
            for (int i = getNumChildComponents(); --i >= 0;)
            {
                if (MultiDocumentPanelWindow* const dw = dynamic_cast <MultiDocumentPanelWindow*> (getChildComponent (i)))
                {
                    if (dw->getContentComponent() == component)
                    {
                        ScopedPointer<MultiDocumentPanelWindow> (dw)->clearContentComponent();
                        break;
                    }
                }
            }

            if (shouldDelete)
                delete component;

            components.removeFirstMatchingValue (component);

            if (isFullscreenWhenOneDocument() && components.size() == 1)
            {
                for (int i = getNumChildComponents(); --i >= 0;)
                {
                    ScopedPointer<MultiDocumentPanelWindow> dw (dynamic_cast <MultiDocumentPanelWindow*> (getChildComponent (i)));

                    if (dw != nullptr)
                        dw->clearContentComponent();
                }

                addAndMakeVisible (components.getFirst());
            }
        }
        else
        {
            jassert (components.indexOf (component) >= 0);

            if (tabComponent != nullptr)
            {
                for (int i = tabComponent->getNumTabs(); --i >= 0;)
                    if (tabComponent->getTabContentComponent (i) == component)
                        tabComponent->removeTab (i);
            }
            else
            {
                removeChildComponent (component);
            }

            if (shouldDelete)
                delete component;

            if (tabComponent != nullptr && tabComponent->getNumTabs() <= numDocsBeforeTabsUsed)
                tabComponent = nullptr;

            components.removeFirstMatchingValue (component);

            if (components.size() > 0 && tabComponent == nullptr)
                addAndMakeVisible (components.getFirst());
        }

        resized();
        activeDocumentChanged();
    }
    else
    {
        jassertfalse;
    }

    return true;
}
开发者ID:L-Naej,项目名称:VirtuOSE-Project,代码行数:83,代码来源:juce_MultiDocumentPanel.cpp


示例11: resized

void CoverAndDetail::resizeEvent(QResizeEvent *event)
{
    QWidget::resizeEvent(event);
    emit resized();
}
开发者ID:baszczewski,项目名称:qtiko,代码行数:5,代码来源:cover_and_detail.cpp


示例12: switch


//.........这里部分代码省略.........
		case showComparatorTables:
			if (getActivePanel()) getActivePanel()->dumpComparatorTables();
			break;

		case showMidiLibrary:
			if (getActivePanel()) getActivePanel()->getPanelWindowManager().toggle (CtrlrPanelWindowManager::MIDILibrary, true);
			break;

		case showModulatorList:
			if (getActivePanel()) getActivePanel()->getPanelWindowManager().toggle (CtrlrPanelWindowManager::ModulatorList, true);
			break;

		case showLayers:
			if (getActivePanel()) getActivePanel()->getPanelWindowManager().toggle (CtrlrPanelWindowManager::LayerEditor, true);
			break;

		case doSendSnapshot:
			if (getActivePanel()) getActivePanel()->sendSnapshot();
			break;

		case doSnapshotStore:
			if (getActivePanel()) getActivePanel()->getCtrlrMIDILibrary().snapshot();
			break;

		case showBufferEditor:
			if (getActivePanel()) getActivePanel()->getPanelWindowManager().toggle (CtrlrPanelWindowManager::BufferEditor, true);
			break;

		case showMidiToolbar:
			if (getActivePanel())
				if (getActivePanel()->getEditor())
				{
					getActivePanel()->getEditor()->toggleMIDIToolbar ();
					resized();
				}
			break;

		case doSaveSaveToCurrentProgram:
		case doSaveSaveToNewProgram:
		case doNewBank:
			break;

		case doIdentityRequest:
			if (isPanelActive())
			{
			}
			break;

		case doEditBufferRequest:
			if (isPanelActive())
			{
			}
			break;

		case doCurrentBankRequest:
			if (isPanelActive())
			{
			}
			break;

		case doCurrentProgramRequest:
			if (isPanelActive())
			{
			}
			break;
开发者ID:noscript,项目名称:ctrlr,代码行数:66,代码来源:CtrlrEditorApplicationCommandsHandlers.cpp


示例13: resized

void PreferencesPanel::setButtonSize (int newSize)
{
    buttonSize = newSize;
    resized();
}
开发者ID:AlessandroGiacomini,项目名称:pyplasm,代码行数:5,代码来源:juce_PreferencesPanel.cpp


示例14: resized

void UIComponent::childComponentChanged()
{
	resized();
}
开发者ID:LabPF,项目名称:plugin-GUI,代码行数:4,代码来源:UIComponent.cpp


示例15: resized

void ListBox::setOutlineThickness (const int outlineThickness_)
{
    outlineThickness = outlineThickness_;
    resized();
}
开发者ID:sonic59,项目名称:JuceEditor,代码行数:5,代码来源:juce_ListBox.cpp


示例16: setResizeHandleCorners


//.........这里部分代码省略.........

	QVBoxLayout *layout = new QVBoxLayout( this );

	const int icon_size = 36;
	const int label_size = 40;

	left_icon = new QLabel;
	left_icon->setAutoFillBackground ( true );
	left_icon->setAlignment( Qt::AlignVCenter | Qt::AlignHCenter );
	left_icon_pixmap = KIconLoader::global()->loadIcon( "go-previous", KIconLoader::NoGroup,
		icon_size, KIconLoader::DefaultState, QStringList(), 0L, false );
	left_icon->setPixmap( left_icon_pixmap );
	left_icon->setFixedHeight( label_size );
	left_icon->setFixedWidth( label_size );
	left_icon->setAttribute( Qt::WA_Hover );
	left_icon->installEventFilter( this );

	title = new QLabel;
	QPalette palette = title->palette();
	palette.setColor( QPalette::WindowText, Plasma::Theme::defaultTheme()->color( Plasma::Theme::TextColor ) );
	palette.setColor( QPalette::Text, Plasma::Theme::defaultTheme()->color( Plasma::Theme::TextColor ) );
	palette.setColor( QPalette::BrightText, Plasma::Theme::defaultTheme()->color( Plasma::Theme::TextColor ) );

	title->setPalette( palette );
	title->setAutoFillBackground ( true );
	title->setAlignment( Qt::AlignVCenter | Qt::AlignHCenter );
	title->setFixedHeight( label_size );

	right_icon = new QLabel;
	right_icon->setAutoFillBackground ( true );
	right_icon->setAlignment( Qt::AlignVCenter | Qt::AlignHCenter );
	right_icon_pixmap = KIconLoader::global()->loadIcon( "go-next", KIconLoader::NoGroup,
		icon_size, KIconLoader::DefaultState, QStringList(), 0L, false );
	right_icon->setPixmap( right_icon_pixmap );
	right_icon->setFixedHeight( label_size );
	right_icon->setFixedWidth( label_size );
	right_icon->setAttribute( Qt::WA_Hover );
	right_icon->installEventFilter( this );

	QHBoxLayout *icon_layout = new QHBoxLayout;
	icon_layout->addWidget( left_icon );
	icon_layout->addWidget( title );
	icon_layout->addWidget( right_icon );

	layout->addLayout( icon_layout );

	background_label = new QLabel;
	background_label->setAutoFillBackground ( true );
	background_label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
	background_label->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );

	label = new QLabel( background_label );
	label->setAutoFillBackground ( true );
	label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
	label->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
	label->resize( background_label->size() );

	label->installEventFilter( this );

	layout->addWidget( background_label );

	setMinimumSize( 50, 50 );

	QPainterPath path;
	path.addRoundRect( QRectF( 0, 0, label_size - 2, label_size - 2 ), 15 );
	QLinearGradient gradient( 0.5, 0, 0.5, 1 );
	gradient.setCoordinateMode( QGradient::ObjectBoundingMode );
	if ( qGray( Plasma::Theme::BackgroundColor ) < 140 )
	{
		gradient.setColorAt( 0, QColor( 240, 240, 240, 255 ) );
		gradient.setColorAt( 1, QColor( 140, 140, 140, 255 ) );
	}
	else
	{
		gradient.setColorAt( 0, QColor( 140, 140, 140, 255 ) );
		gradient.setColorAt( 1, QColor( 40, 40, 40, 255 ) );
	}

	left_icon_pixmap_lighter = QPixmap( label_size, label_size );
	left_icon_pixmap_lighter.fill( Qt::transparent );
	QPainter painter_left( &left_icon_pixmap_lighter );
	painter_left.setBrush( gradient );
	painter_left.translate( 1, 1 );
	painter_left.drawPath( path );
	painter_left.translate( -1, -1 );
	painter_left.drawPixmap( QRect( (int)(0.5*(label_size-icon_size)), (int)(0.5*(label_size-icon_size)),
		left_icon_pixmap.width(), left_icon_pixmap.height() ), left_icon_pixmap );

	right_icon_pixmap_lighter = QPixmap( label_size, label_size );
	right_icon_pixmap_lighter.fill( Qt::transparent );
	QPainter painter_right( &right_icon_pixmap_lighter );
	painter_right.setBrush( gradient );
	painter_left.translate( 0.5, 0.5 );
	painter_right.drawPath( path );
	painter_left.translate( -0.5, -0.5 );
	painter_right.drawPixmap( QRect( (int)(0.5*(label_size-icon_size)), (int)(0.5*(label_size-icon_size)),
		right_icon_pixmap.width(), right_icon_pixmap.height() ), right_icon_pixmap );

	connect( this, SIGNAL( dialogResized() ), this, SLOT( resized() ) );
}
开发者ID:pkt,项目名称:plasma-widget-cwp-1.5.14-el,代码行数:101,代码来源:plasma-cwp-pixmap-list-dialog.cpp


示例17: QObject

UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
        : QObject(parent)
        , mTransparentDrawingView(0)
        , mTransparentDrawingScene(0)
        , mDesktopPalette(NULL)
        , mDesktopPenPalette(NULL)
        , mDesktopMarkerPalette(NULL)
        , mDesktopEraserPalette(NULL)
        , mWindowPositionInitialized(0)
        , mIsFullyTransparent(false)
        , mDesktopToolsPalettePositioned(false)
        , mPendingPenButtonPressed(false)
        , mPendingMarkerButtonPressed(false)
        , mPendingEraserButtonPressed(false)
        , mbArrowClicked(false)
        , mBoardStylusTool(UBDrawingController::drawingController()->stylusTool())
        , mDesktopStylusTool(UBDrawingController::drawingController()->stylusTool())
{

    mTransparentDrawingView = new UBBoardView(UBApplication::boardController, 0); // deleted in UBDesktopAnnotationController::destructor

    mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
	// !!!! Should be included into Windows after QT recompilation
#ifdef Q_WS_MAC
    mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
#endif
    mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window);
    mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone);
    mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height());

    mTransparentDrawingView->setMouseTracking(true);

    mTransparentDrawingView->setAcceptDrops(true);

    QString backgroundStyle = "QWidget {background-color: rgba(127, 127, 127, 0)}";
    mTransparentDrawingView->setStyleSheet(backgroundStyle);

    mTransparentDrawingScene = new UBGraphicsScene(0);
    mTransparentDrawingView->setScene(mTransparentDrawingScene);
    mTransparentDrawingScene->setDrawingMode(true);

    mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView);

    if (UBPlatformUtils::hasVirtualKeyboard())
    {
        connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)), 
                 mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool)));

#ifdef Q_WS_X11
        connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask()));
        connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask()));
        connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask()));
#endif
    }

    connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(goToUniboard()));
    connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(customCapture()));
    connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(windowCapture()));
    connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture()));
    connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized()));
    connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize()));

    connect(mTransparentDrawingView, SIGNAL(resized(QResizeEvent*)), this, SLOT(onTransparentWidgetResized()));


    connect(UBDrawingController::drawingController(), SIGNAL(stylusToolChanged(int))
            , this, SLOT(stylusToolChanged(int)));

    // Add the desktop associated palettes
    mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView);

    connect(mDesktopPalette, SIGNAL(maximized()), mDesktopPenPalette, SLOT(onParentMaximized()));
    connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), mDesktopPenPalette, SLOT(onParentMinimized()));

    mDesktopMarkerPalette = new UBDesktopMarkerPalette(mTransparentDrawingView);
    mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView);

    mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
    mDesktopPenPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
    mDesktopMarkerPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
    mDesktopEraserPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);


    // Hack : the size of the property palettes is computed the first time the palette is visible
    //        In order to prevent palette overlap on if the desktop palette is on the right of the
    //        screen, a setVisible(true) followed by a setVisible(false) is done.
    mDesktopPenPalette->setVisible(true);
    mDesktopMarkerPalette->setVisible(true);
    mDesktopEraserPalette->setVisible(true);
    mDesktopPenPalette->setVisible(false);
    mDesktopMarkerPalette->setVisible(false);
    mDesktopEraserPalette->setVisible(false);

    connect(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations()));

    connect(&mHoldTimerPen, SIGNAL(timeout()), this, SLOT(penActionReleased()));
    connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased()));
    connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased()));

#ifdef Q_WS_X11
//.........这里部分代码省略.........
开发者ID:colombc,项目名称:Sankore-3.1,代码行数:101,代码来源:UBDesktopAnnotationController.cpp


示例18: hide

bool PixmapListDialog::eventFilter( QObject *obj, QEvent *event )
{
	if ( obj == label )
	{
		if ( event->type() == QEvent::MouseButtonPress && ((QMouseEvent*)event)->button() == Qt::LeftButton && !isHidden() )
		{
			hide();
			emit( hidden() );
			left_icon_hover = false;
			right_icon_hover = false;
			return true;
		}

		if ( event->type() == QEvent::Wheel && !isHidden() )
		{
			int shift = ((QWheelEvent*)event)->delta() / 120;
			label->movie()->stop();
			label->movie()->jumpToFrame( label->movie()->currentFrameNumber() + shift );
			return true;
		}

		if ( event->type() == QEvent::MouseButtonPress && ((QMouseEvent*)event)->button() == Qt::MidButton && !isHidden() )
		{
			switch ( label->movie()->state() )
			{
				case QMovie::NotRunning:
					label->movie()->start();
					break;

				case QMovie::Paused:
					label->movie()->setPaused( false );
					break;

				case QMovie::Running:
					label->movie()->setPaused( true );
					break;

				default:
				break;
			}

			return true;
		}
	}

	if ( obj == left_icon )
	{
		if ( ( event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonDblClick ) && ((QMouseEvent*)event)->button() == Qt::LeftButton && !isHidden() && !left_icon->isHidden() && contents_image_list.size() > 0 ) // back
		{
			current_image--;
			if ( current_image < 0 ) current_image = 0;
			emit( currentImageChanged( current_image ) );
			resized();
			return true;
		}

		if ( event->type() == QEvent::HoverEnter && !left_icon->pixmap()->isNull() )
		{
			left_icon->setPixmap( left_icon_pixmap_lighter );
			left_icon_hover = true;
			return false;
		}

		if ( event->type() == QEvent::HoverLeave && !left_icon->pixmap()->isNull() )
		{
			left_icon->setPixmap( left_icon_pixmap );
			left_icon_hover = false;
			return false;
		}
	}

	if ( obj == right_icon )
	{
		if ( ( event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonDblClick ) && !isHidden() && !right_icon->isHidden() && contents_image_list.size() > 0 ) // forward
		{
			current_image++;
			if ( current_image > contents_image_list.size() - 1 ) current_image = contents_image_list.size() - 1;
			emit( currentImageChanged( current_image ) );
			resized();
			return true;
		}

		if ( event->type() == QEvent::HoverEnter && !right_icon->pixmap()->isNull() )
		{
			right_icon->setPixmap( right_icon_pixmap_lighter );
			right_icon_hover = true;
			return false;
		}

		if ( event->type() == QEvent::HoverLeave && !right_icon->pixmap()->isNull() )
		{
			right_icon->setPixmap( right_icon_pixmap );
			right_icon_hover = false;
			return false;
		}
	}

	return false;
}
开发者ID:pkt,项目名称:plasma-widget-cwp-1.5.14-el,代码行数:99,代码来源:plasma-cwp-pixmap-list-dialog.cpp


示例19: resized

//==============================================================================
void MidiKeyboardComponent::setKeyWidth (const float widthInPixels)
{
    keyWidth = widthInPixels;
    resized();
}
开发者ID:baeksanchang,项目名称:juce,代码行数:6,代码来源:juce_MidiKeyboardComponent.cpp


示例20: resized

void View::resizeEvent(QResizeEvent *event)
{
	emit resized(event->size());
}
开发者ID:ruphy,项目名称:ui-in-qgv,代码行数:4,代码来源:view.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ resolution函数代码示例发布时间:2022-05-30
下一篇:
C++ resize_image函数代码示例发布时间: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