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); }
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); }
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())); }
ToolBar::ToolBar(const QMap<InstrumentsEnum, QAction *> &actMap, QWidget *parent) : QToolBar(tr("Instruments"), parent), mActMap(actMap) { setMovable(false); initializeItems(); mPrevInstrumentSetted = false; }
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))); }
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); }
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); }
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; }
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); }
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 }
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 ) ) ); }
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() ) ); }
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(); }
GmacsTabWidget::GmacsTabWidget(QWidget *parent) : QTabWidget(parent) { setTabShape(QTabWidget::Triangular); setMovable(true); //setTabClosable(true); //setDocumentMode(true); }
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; }
TabBar::TabBar(QWidget *parent) : QTabBar(parent) , closingTabState_(CloseTabIdle) , indexClickedTab_(-1) , tabFixed_(false) { setObjectName("tabBar_"); setFocusPolicy(Qt::NoFocus); setDocumentMode(true); setMouseTracking(true); setExpanding(false); setMovable(true); setElideMode(Qt::ElideNone); setIconSize(QSize(0, 0)); setContextMenuPolicy(Qt::CustomContextMenu); setStyleSheet(QString("#tabBar_ QToolButton {border: 1px solid %1; border-radius: 2px; background: %2;}"). arg(qApp->palette().color(QPalette::Dark).name()). arg(palette().background().color().name())); addTab(""); connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenuTabBar(const QPoint &))); installEventFilter(this); }
TabBar::TabBar(QWidget *parent) : QTabBar(parent) , m_viewTabBarAction(0) , m_showTabBarWhenOneTab(true) { setContextMenuPolicy(Qt::CustomContextMenu); setAcceptDrops(true); setElideMode(Qt::ElideRight); setUsesScrollButtons(true); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenuRequested(const QPoint &))); QString alt = QLatin1String("Ctrl+%1"); for (int i = 0; i < 10; ++i) { int key = i == 9 ? 0 : i + 1; TabShortcut *tabShortCut = new TabShortcut(i, alt.arg(key), this); connect(tabShortCut, SIGNAL(activated()), this, SLOT(selectTabAction())); } m_viewTabBarAction = new QAction(this); updateViewToolBarAction(); connect(m_viewTabBarAction, SIGNAL(triggered()), this, SLOT(viewTabBar())); #if QT_VERSION >= 0x040500 setMovable(true); #endif }
KeyboardHelper::KeyboardHelper(const Rect &r, Keyboard *p, bool) : Widget(r, (Widget*)p), m_parent(p), m_poputButton(0) { setMovable(false); }
TrigBar::TrigBar(SigSession &session, QWidget *parent) : QToolBar("Trig Bar", parent), _session(session), _enable(true), _trig_button(this), _protocol_button(this), _measure_button(this), _search_button(this), _math_button(this) { setMovable(false); setContentsMargins(0,0,0,0); connect(&_trig_button, SIGNAL(clicked()), this, SLOT(trigger_clicked())); connect(&_protocol_button, SIGNAL(clicked()), this, SLOT(protocol_clicked())); connect(&_measure_button, SIGNAL(clicked()), this, SLOT(measure_clicked())); connect(&_search_button, SIGNAL(clicked()), this, SLOT(search_clicked())); _trig_button.setIcon(QIcon::fromTheme("trig", QIcon(":/icons/trigger.png"))); _trig_button.setCheckable(true); _protocol_button.setIcon(QIcon::fromTheme("trig", QIcon(":/icons/protocol.png"))); #ifdef ENABLE_DECODE _protocol_button.setCheckable(true); #endif _measure_button.setIcon(QIcon::fromTheme("trig", QIcon(":/icons/measure.png"))); _measure_button.setCheckable(true); _search_button.setIcon(QIcon::fromTheme("trig", QIcon(":/icons/search-bar.png"))); _search_button.setCheckable(true); _math_button.setIcon(QIcon::fromTheme("trig", QIcon(":/icons/math.png"))); _action_fft = new QAction(this); _action_fft->setText(QApplication::translate( "Math", "&FFT", 0)); _action_fft->setIcon(QIcon::fromTheme("Math", QIcon(":/icons/fft.png"))); _action_fft->setObjectName(QString::fromUtf8("actionFft")); connect(_action_fft, SIGNAL(triggered()), this, SLOT(on_actionFft_triggered())); _math_menu = new QMenu(this); _math_menu->setContentsMargins(0,0,0,0); _math_menu->addAction(_action_fft); _math_button.setPopupMode(QToolButton::InstantPopup); _math_button.setMenu(_math_menu); _trig_action = addWidget(&_trig_button); _protocol_action = addWidget(&_protocol_button); _measure_action = addWidget(&_measure_button); _search_action = addWidget(&_search_button); _math_action = addWidget(&_math_button); }
ToolBar::ToolBar (QWidget *parent = NULL) : QToolBar(parent) { setAllowedAreas(Qt::AllToolBarAreas); setMovable(true); setFloatable(true); initActions(); }
OutputWidget::OutputWidget(QWidget *parent) : QTabWidget(parent) { setTabsClosable(true); setMovable(true); connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(closePage(int))); }
Ui::ToolBar::ToolBar(QWidget *parent) : QToolBar(parent) , renderer(0) { setObjectName("MainToolBar"); setMovable(false); setContextMenuPolicy(Qt::NoContextMenu); }
////////////////////////////////////////////////////////////// // Default Constructor ////////////////////////////////////////////////////////////// MHTabBar::MHTabBar(QWidget* parent, bool allowDetach, bool allowDelete) : QTabBar(parent) { mAllowDetach = allowDetach; mAllowDelete = allowDelete; setAcceptDrops(true); setElideMode(Qt::ElideRight); setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab); setMovable(true); }
int QToolBar::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 < 13) qt_static_metacall(this, _c, _id, _a); _id -= 13; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = isMovable(); break; case 1: *reinterpret_cast< Qt::ToolBarAreas*>(_v) = allowedAreas(); break; case 2: *reinterpret_cast< Qt::Orientation*>(_v) = orientation(); break; case 3: *reinterpret_cast< QSize*>(_v) = iconSize(); break; case 4: *reinterpret_cast< Qt::ToolButtonStyle*>(_v) = toolButtonStyle(); break; case 5: *reinterpret_cast< bool*>(_v) = isFloating(); break; case 6: *reinterpret_cast< bool*>(_v) = isFloatable(); break; } _id -= 7; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setMovable(*reinterpret_cast< bool*>(_v)); break; case 1: setAllowedAreas(*reinterpret_cast< Qt::ToolBarAreas*>(_v)); break; case 2: setOrientation(*reinterpret_cast< Qt::Orientation*>(_v)); break; case 3: setIconSize(*reinterpret_cast< QSize*>(_v)); break; case 4: setToolButtonStyle(*reinterpret_cast< Qt::ToolButtonStyle*>(_v)); break; case 6: setFloatable(*reinterpret_cast< bool*>(_v)); break; } _id -= 7; } else if (_c == QMetaObject::ResetProperty) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyDesignable) { bool *_b = reinterpret_cast<bool*>(_a[0]); switch (_id) { case 0: *_b = (qobject_cast<QMainWindow*>(parentWidget())!=0); break; case 1: *_b = (qobject_cast<QMainWindow*>(parentWidget())!=0); break; case 2: *_b = (qobject_cast<QMainWindow*>(parentWidget())==0); break; } _id -= 7; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 7; } #endif // QT_NO_PROPERTIES return _id; }
ToolBar::ToolBar (QWidget *parent) : QToolBar(parent) { wheelEventState = false; setAllowedAreas(Qt::AllToolBarAreas); setMovable(true); setFloatable(true); initActions(); }
TerminalView::TerminalView(QWidget *parent) : QTabWidget(parent) { termId = 1; icon.addFile(QString::fromUtf8(":/images/terminal.png"), QSize(), QIcon::Normal, QIcon::On); setMovable(true); setTabsClosable(true); connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(closePage(int))); }
DiagramsView::DiagramsView(QWidget *parent) : QTabWidget(parent), m_diagramsManager(0) { setTabsClosable(true); setMovable(true); setDocumentMode(false); connect(this, SIGNAL(currentChanged(int)), this, SLOT(onCurrentChanged(int))); connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(onTabCloseRequested(int))); }
SqlResulTab::SqlResulTab(QWidget *parent) : QTabWidget(parent) { errors=NULL; output=NULL; setMovable(true); setTabsClosable(true); //queryModel=new QSqlQueryModel; connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(closeRequestedTab(int))); }
FileListHeader::FileListHeader( Qt::Orientation orientation, QWidget *parent /*= NULL*/ ) : QHeaderView(orientation, parent) { setMovable(true); setStretchLastSection(true); setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter); setStyleSheet(QString("border-top: 0px solid #5d6c78; border-bottom: %1px solid white;").arg(VIEWPORT_MARGIN_TOP)); connect(this, SIGNAL(sectionDoubleClicked(int)), SLOT(sectionDoubleClickedSlot(int))); }
DockableTabWidget::DockableTabWidget( QWidget* parentWidget, QMainWindow* mainWindow ) : QTabWidget( parentWidget ) , m_mainWindow( mainWindow ) { // add the tabs manager setContextMenuPolicy( Qt::CustomContextMenu ); setTabsClosable( true ); setMovable( true ); connect( this, SIGNAL( tabCloseRequested ( int ) ), this, SLOT( closeTab( int ) ) ); connect( this, SIGNAL( customContextMenuRequested( const QPoint& ) ), this, SLOT( showPopupMenu( const QPoint& ) ) ); }