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


C++ setMovable函数代码示例

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


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

示例1: KTabBar

TabBar::TabBar(QWidget *parent)
    : KTabBar(parent)
    , m_actualIndex(-1)
    , m_currentTabPreviewIndex(-1)
    , m_isFirstTimeOnTab(true)
    , m_tabHighlightEffect(new TabHighlightEffect(this))
    , m_animationMapper(new QSignalMapper(this))
{
    setElideMode(Qt::ElideRight);

    setDocumentMode(true);
    setTabsClosable(true);
    setMovable(true);

    setContextMenuPolicy(Qt::CustomContextMenu);

    // avoid ambiguos shortcuts. See BUG:275858
    KAcceleratorManager::setNoAccel(this);

    connect(this, SIGNAL(contextMenu(int, QPoint)), this, SLOT(contextMenu(int, QPoint)));
    connect(this, SIGNAL(emptyAreaContextMenu(QPoint)), this, SLOT(emptyAreaContextMenu(QPoint)));

    connect(m_animationMapper, SIGNAL(mapped(int)), this, SLOT(removeAnimation(int)));
    setGraphicsEffect(m_tabHighlightEffect);

    setAnimatedTabHighlighting(ReKonfig::animatedTabHighlighting());
    setAcceptDrops(true);
}
开发者ID:Arakmar,项目名称:rekonq,代码行数:28,代码来源:tabbar.cpp

示例2: setFloatable

void UIToolBar::prepare()
{
    /* Configure tool-bar: */
    setFloatable(false);
    setMovable(false);

#if QT_VERSION < 0x050000
    /* Remove that ugly frame panel around the toolbar.
     * Doing that currently for Cleanlooks & Windows styles. */
    if (qobject_cast <QWindowsStyle*>(QToolBar::style()) ||
            qobject_cast <QCleanlooksStyle*>(QToolBar::style()))
        setStyleSheet("QToolBar { border: 0px none black; }");
#else /* QT_VERSION >= 0x050000 */
# ifdef VBOX_WS_MAC
    setStyleSheet("QToolBar { border: 0px none black; }");
# endif /* VBOX_WS_MAC */
#endif /* QT_VERSION >= 0x050000 */

    /* Configure tool-bar' layout: */
    if (layout())
        layout()->setContentsMargins(0, 0, 0, 0);

    /* Configure tool-bar' context-menu policy: */
    setContextMenuPolicy(Qt::NoContextMenu);
}
开发者ID:miguelinux,项目名称:vbox,代码行数:25,代码来源:UIToolBar.cpp

示例3: QTabBar

TabBar::TabBar(QupZilla* mainClass, TabWidget* tabWidget)
    : QTabBar()
    , p_QupZilla(mainClass)
    , m_tabWidget(tabWidget)
    , m_tabPreview(new TabPreview(mainClass, tabWidget))
    , m_showTabPreviews(false)
    , m_clickedTab(0)
    , m_pinnedTabsCount(0)
    , m_normalTabWidth(0)
    , m_activeTabWidth(0)
{
    setObjectName("tabbar");
    setContextMenuPolicy(Qt::CustomContextMenu);
    setElideMode(Qt::ElideRight);
    setDocumentMode(true);
    setFocusPolicy(Qt::NoFocus);
    setTabsClosable(true);
    setMouseTracking(true);
    setMovable(true);

    setAcceptDrops(true);

    connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
    connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenuRequested(const QPoint &)));
    connect(m_tabWidget, SIGNAL(pinnedTabClosed()), this, SLOT(pinnedTabClosed()));
    connect(m_tabWidget, SIGNAL(pinnedTabAdded()), this, SLOT(pinnedTabAdded()));

    m_tabPreviewTimer = new QTimer(this);
    m_tabPreviewTimer->setInterval(200);
    m_tabPreviewTimer->setSingleShot(true);
    connect(m_tabPreviewTimer, SIGNAL(timeout()), m_tabPreview, SLOT(hideAnimated()));
}
开发者ID:ff2000,项目名称:qupzilla,代码行数:32,代码来源:tabbar.cpp

示例4: QToolBar

ToolBar::ToolBar(const QMap<InstrumentsEnum, QAction *> &actMap, QWidget *parent) :
    QToolBar(tr("Instruments"), parent), mActMap(actMap)
{
    setMovable(false);
    initializeItems();
    mPrevInstrumentSetted = false;
}
开发者ID:athenaie,项目名称:EasyPaint,代码行数:7,代码来源:toolbar.cpp

示例5: QTabBar

TabBarWidget::TabBarWidget(QWidget *parent) : QTabBar(parent),
	m_previewWidget(NULL),
	m_tabSize(0),
	m_pinnedTabsAmount(0),
	m_clickedTab(-1),
	m_hoveredTab(-1),
	m_previewTimer(0),
	m_enablePreviews(true)
{
	qRegisterMetaType<WindowLoadingState>("WindowLoadingState");
	setDrawBase(false);
	setExpanding(false);
	setMovable(true);
	setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
	setElideMode(Qt::ElideRight);
	setMouseTracking(true);
	setDocumentMode(true);

	m_closeButtonPosition = static_cast<QTabBar::ButtonPosition>(QApplication::style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition));
	m_iconButtonPosition = ((m_closeButtonPosition == QTabBar::RightSide) ? QTabBar::LeftSide : QTabBar::RightSide);

	optionChanged(QLatin1String("TabBar/ShowCloseButton"), SettingsManager::getValue(QLatin1String("TabBar/ShowCloseButton")));
	optionChanged(QLatin1String("TabBar/EnablePreviews"), SettingsManager::getValue(QLatin1String("TabBar/EnablePreviews")));

	connect(SettingsManager::getInstance(), SIGNAL(valueChanged(QString,QVariant)), this, SLOT(optionChanged(QString,QVariant)));
	connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
	connect(this, SIGNAL(tabCloseRequested(int)), this, SIGNAL(requestedClose(int)));
}
开发者ID:NYAMNYAM3,项目名称:otter,代码行数:28,代码来源:TabBarWidget.cpp

示例6: QTabWidget

ViewManager::ViewManager(DwarfModel *dm, DwarfModelProxy *proxy,
                         QWidget *parent)
    : QTabWidget(parent)
    , m_model(dm)
    , m_proxy(proxy)
    , m_add_tab_button(new QToolButton(this))
{
    m_proxy->setSourceModel(m_model);
    setTabsClosable(true);
    setMovable(true);

    //reload_views();

    m_add_tab_button->setText(tr("Add "));
    m_add_tab_button->setIcon(QIcon(":img/ui-tab--plus.png"));
    m_add_tab_button->setPopupMode(QToolButton::InstantPopup);
    m_add_tab_button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
    m_add_tab_button->setToolTip(tr("Add an existing view. New views can be copied or created from the [Windows->Docks->Grid Views] dock."));
    draw_add_tab_button();
    setCornerWidget(m_add_tab_button, Qt::TopLeftCorner);    

    connect(tabBar(), SIGNAL(tabMoved(int, int)), SLOT(write_views()));
    connect(tabBar(), SIGNAL(currentChanged(int)), SLOT(setCurrentIndex(int)), Qt::UniqueConnection);
    connect(this, SIGNAL(tabCloseRequested(int)), SLOT(remove_tab_for_gridview(int)));
    connect(m_model, SIGNAL(need_redraw()), SLOT(redraw_current_tab()));
    //draw_views();

    m_squad_warning = new QErrorMessage(this);    
}
开发者ID:His-name-is-Joof,项目名称:Dwarf-Therapist,代码行数:29,代码来源:viewmanager.cpp

示例7: QTabWidget

AS_NAMESPACE_START

EditorTabs::EditorTabs(QWidget *parent)
    : QTabWidget(parent), _finder(nullptr)
{
    _connections << connect(parent, SIGNAL(editCopy()), this, SLOT(onEditCopy()));
    _connections << connect(parent, SIGNAL(editCut()), this, SLOT(onEditCut()));
    _connections << connect(parent, SIGNAL(editFind()), this, SLOT(onEditFind()));
    _connections << connect(parent, SIGNAL(editGoto()), this, SLOT(onEditGoto()));
    _connections << connect(parent, SIGNAL(editPaste()), this, SLOT(onEditPaste()));
    _connections << connect(parent, SIGNAL(editRedo()), this, SLOT(onEditRedo()));
    _connections << connect(parent, SIGNAL(editReplace()), this, SLOT(onEditReplace()));
    _connections << connect(parent, SIGNAL(editUndo()), this, SLOT(onEditUndo()));
    _connections << connect(parent, SIGNAL(fileClose()), this, SLOT(onFileClose()));
    _connections << connect(parent, SIGNAL(fileCloseAll()), this, SLOT(onFileCloseAll()));
    _connections << connect(parent, SIGNAL(fileOpen(QString)), this, SLOT(onFileOpen(QString)));
    _connections << connect(parent, SIGNAL(fileSave()), this, SLOT(onFileSave()));
    _connections << connect(parent, SIGNAL(fileSaveAll()), this, SLOT(onFileSaveAll()));
    _connections << connect(this, &QTabWidget::tabCloseRequested, this, &EditorTabs::onTabCloseRequested);
    _connections << connect(tabBar(), &QTabBar::tabMoved, this, &EditorTabs::onTabMoved);
    _connections << connect(this, &EditorTabs::currentChanged, this, &EditorTabs::onCurrentChanged);
    _connections << connect(this, SIGNAL(fileChanged(QString)), parent, SLOT(onFileChanged(QString)));
    _connections << connect(this, SIGNAL(fileSaved(QString)), parent, SLOT(onFileSaved(QString)));
    setMovable(true);
    setTabsClosable(true);
}
开发者ID:kkodali,项目名称:apkstudio,代码行数:26,代码来源:editortabs.cpp

示例8: Window

ConnectionDialog::ConnectionDialog(const std::string &text,
                                   const StateT cancelState) :
    Window("", Modal_false, nullptr, "connection.xml"),
    ActionListener(),
    mCancelState(cancelState)
{
    mTitleBarHeight = 0;
    setMovable(false);
    setMinWidth(0);

    ProgressIndicator *const progressIndicator = new ProgressIndicator(this);
    Label *const label = new Label(this, text);
    Button *const cancelButton = new Button(
        // TRANSLATORS: connection dialog button
        this, _("Cancel"), "cancelButton", this);

    place(0, 0, progressIndicator);
    place(0, 1, label);
    place(0, 2, cancelButton).setHAlign(LayoutCell::CENTER);
    reflowLayout();

    center();
    if ((mSearchHash ^ 0x202020U) == 0x70E9296C)
        mStatsReUpdated = true;
}
开发者ID:Action-Committee,项目名称:ManaPlus,代码行数:25,代码来源:connectiondialog.cpp

示例9: setAutoAlpha

	void Window::setPropertyOverride(const std::string& _key, const std::string& _value)
	{
		/// @wproperty{Window, AutoAlpha, bool} Режим регулировки прозрачности опираясь на фокус ввода.
		if (_key == "AutoAlpha")
			setAutoAlpha(utility::parseValue<bool>(_value));

		/// @wproperty{Window, Snap, bool} Режим прилипания к краям экрана.
		else if (_key == "Snap")
			setSnap(utility::parseValue<bool>(_value));

		/// @wproperty{Window, MinSize, int int} Минимальный размер окна.
		else if (_key == "MinSize")
			setMinSize(utility::parseValue<IntSize>(_value));

		/// @wproperty{Window, MaxSize, int int} Максимальный размер окна.
		else if (_key == "MaxSize")
			setMaxSize(utility::parseValue<IntSize>(_value));

		/// @wproperty{Window, Movable, bool} Режим движения окна мышью за любой участок.
		else if (_key == "Movable")
			setMovable(utility::parseValue<bool>(_value));

		else
		{
			Base::setPropertyOverride(_key, _value);
			return;
		}

		eventChangeProperty(this, _key, _value);
	}
开发者ID:norak,项目名称:MMO-Framework,代码行数:30,代码来源:MyGUI_Window.cpp

示例10: QTabBar

WBTabBar::WBTabBar(QWidget *parent)
    : QTabBar(parent)
{

    setObjectName("ubWebBrowserTabBar");

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

    QString alt = QLatin1String("Alt+%1");
    for (int i = 1; i <= 10; ++i) {
        int key = i;
        if (key == 10)
            key = 0;
        QShortcut *shortCut = new QShortcut(alt.arg(key), this);
        mTabShortcuts.append(shortCut);
        connect(shortCut, SIGNAL(activated()), this, SLOT(selectTabAction()));
    }
    setTabsClosable(true);
    connect(this, SIGNAL(tabCloseRequested(int)), this, SIGNAL(closeTab(int)));
    setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
    setMovable(true);
    setDocumentMode(false);

#ifdef Q_OS_OSX
    QFont baseFont = font();
    baseFont.setPointSize(baseFont.pointSize() - 2);
    setFont(baseFont);
#endif
}
开发者ID:OpenBoard-org,项目名称:OpenBoard,代码行数:32,代码来源:WBTabWidget.cpp

示例11: QHeaderView

ViewHeader::ViewHeader( QAbstractItemView* parent )
    : QHeaderView( Qt::Horizontal, parent )
    , m_parent( parent )
    , m_menu( new QMenu( this ) )
    , m_sigmap( new QSignalMapper( this ) )
    , m_init( false )
{
    m_menu->setFont( TomahawkUtils::systemFont() );

#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
    setSectionResizeMode( QHeaderView::Interactive );
    setSectionsMovable( true );
#else
    setResizeMode( QHeaderView::Interactive );
    setMovable( true );
#endif
    setMinimumSectionSize( 60 );
    setDefaultAlignment( Qt::AlignLeft );
    setStretchLastSection( true );

//    m_menu->addAction( tr( "Resize columns to fit window" ), this, SLOT( onToggleResizeColumns() ) );
//    m_menu->addSeparator();

    connect( m_sigmap, SIGNAL( mapped( int ) ), SLOT( toggleVisibility( int ) ) );
}
开发者ID:AshotN,项目名称:tomahawk,代码行数:25,代码来源:ViewHeader.cpp

示例12: SC_RecentlyClosedTab

SC_SimulateTab::SC_SimulateTab( QWidget* parent, SC_RecentlyClosedTabItemModel* modelToUse ):
    SC_RecentlyClosedTab( parent, modelToUse ),
    addTabWidget( new QWidget( this ) ),
    lastSimulateTabIndexOffset( -2 )
{
    setTabsClosable( true );

    setCloseAllTabsTitleText( tr( "Close ALL Simulate Tabs?" ) );
    setCloseAllTabsBodyText( tr( "Do you really want to close ALL simulation profiles?" ) );
    QIcon addTabIcon( ":/icon/addtab.png" );
    int i = addTab( addTabWidget, addTabIcon, addTabIcon.pixmap( QSize( 64, 64 ) ).isNull() ? "+" : "" );
    tabBar() -> setTabButton( i, QTabBar::LeftSide, 0 );
    tabBar() -> setTabButton( i, QTabBar::RightSide, 0 );
    addCloseAllExclude( addTabWidget );

    enableDragHoveredOverTabSignal( true );
    connect( this, SIGNAL( mouseDragHoveredOverTab( int ) ), this, SLOT( mouseDragSwitchTab( int ) ) );
    connect( this, SIGNAL( currentChanged( int ) ), this, SLOT( addNewTab( int ) ) );
    connect( this, SIGNAL( tabCloseRequested( int ) ), this, SLOT( TabCloseRequest( int ) ) );
    // Using QTabBar::tabMoved(int,int) signal turns out to be very wonky
    // It is emitted WHILE tabs are still being dragged and looks very funny
    // This is the best way I could find to enable this
    setMovable( true ); // Would need to disallow moving the + tab, or to the right of it. That would require subclassing tabbar
    connect( this, SIGNAL( tabBarLayoutRequestEvent() ), this, SLOT( enforceAddTabWidgetLocationInvariant() ) );
}
开发者ID:Ambalus,项目名称:simc,代码行数:25,代码来源:sc_SimulateTab.cpp

示例13: m_entity

TaskWindow::TaskWindow(Eris::Entity * e) : m_entity(e)
{
  assert(e != 0);

  gcn::Color base = getBaseColor();
  base.a = 128;
  setBaseColor(base);

  // setTitleBarHeight(0);
  setMovable(false);

  // setOpaque(true);

  m_vbox = new gcn::VBox(2);
  m_widgets.push_back(SPtr<gcn::Widget>(m_vbox));

  m_progressBar = new gcn::Bar;
  m_widgets.push_back(SPtr<gcn::Widget>(m_progressBar));
  m_progressBar->setWidth(100);
  m_progressBar->setHeight(6);
  m_progressBar->setValue(0.0);
  m_progressBar->setForegroundColor(gcn::Color(0xaaaaaa));
  m_progressBar->setBaseColor(gcn::Color(0,0,0,25));
  m_vbox->pack(m_progressBar);

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

示例14: QTabWidget

GmacsTabWidget::GmacsTabWidget(QWidget *parent) : QTabWidget(parent)
{
	setTabShape(QTabWidget::Triangular);
	setMovable(true);
	//setTabClosable(true);
	//setDocumentMode(true);
}
开发者ID:goccy,项目名称:gmacs,代码行数:7,代码来源:GmacsTabWidget.cpp

示例15: qt_static_metacall

int QTabBar::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< Shape*>(_v) = shape(); break;
        case 1: *reinterpret_cast< int*>(_v) = currentIndex(); break;
        case 2: *reinterpret_cast< int*>(_v) = count(); break;
        case 3: *reinterpret_cast< bool*>(_v) = drawBase(); break;
        case 4: *reinterpret_cast< QSize*>(_v) = iconSize(); break;
        case 5: *reinterpret_cast< Qt::TextElideMode*>(_v) = elideMode(); break;
        case 6: *reinterpret_cast< bool*>(_v) = usesScrollButtons(); break;
        case 7: *reinterpret_cast< bool*>(_v) = tabsClosable(); break;
        case 8: *reinterpret_cast< SelectionBehavior*>(_v) = selectionBehaviorOnRemove(); break;
        case 9: *reinterpret_cast< bool*>(_v) = expanding(); break;
        case 10: *reinterpret_cast< bool*>(_v) = isMovable(); break;
        case 11: *reinterpret_cast< bool*>(_v) = documentMode(); break;
        }
        _id -= 12;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setShape(*reinterpret_cast< Shape*>(_v)); break;
        case 1: setCurrentIndex(*reinterpret_cast< int*>(_v)); break;
        case 3: setDrawBase(*reinterpret_cast< bool*>(_v)); break;
        case 4: setIconSize(*reinterpret_cast< QSize*>(_v)); break;
        case 5: setElideMode(*reinterpret_cast< Qt::TextElideMode*>(_v)); break;
        case 6: setUsesScrollButtons(*reinterpret_cast< bool*>(_v)); break;
        case 7: setTabsClosable(*reinterpret_cast< bool*>(_v)); break;
        case 8: setSelectionBehaviorOnRemove(*reinterpret_cast< SelectionBehavior*>(_v)); break;
        case 9: setExpanding(*reinterpret_cast< bool*>(_v)); break;
        case 10: setMovable(*reinterpret_cast< bool*>(_v)); break;
        case 11: setDocumentMode(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 12;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 12;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
开发者ID:Arise,项目名称:Open-DPI-Detector,代码行数:60,代码来源:moc_qtabbar.cpp


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