void NickView::unanimatedExpandAll() { // since of Qt Version 4.8.0 the default expandAll will not properly work if // animations are enabled. Therefore we perform an unanimated expand when a // model is set or a toplevel node is inserted. bool wasAnimated = isAnimated(); setAnimated(false); expandAll(); setAnimated(wasAnimated); }
void View::keyPressEvent(QKeyEvent *e) { const qreal c_keyFactor = 2.0; switch(e->key()) { case Qt::Key_Space: setAnimated( !isAnimated() ); break; case Qt::Key_Up : if(e->modifiers() & Qt::ControlModifier ) setRoll( roll() + c_keyFactor ); else setRotate( rotate() + QVector3D(-c_keyFactor , 0, 0) ); break; case Qt::Key_Down : if(e->modifiers() & Qt::ControlModifier ) setRoll( roll() - c_keyFactor ); else setRotate( rotate() + QVector3D(c_keyFactor , 0, 0) ); break; case Qt::Key_Left : setRotate( rotate() + QVector3D(0 , 0, -c_keyFactor) ); break; case Qt::Key_Right: setRotate( rotate() + QVector3D(0 , 0, c_keyFactor) ); break; case Qt::Key_Plus : setScale( scale() * 1.2 ); break; case Qt::Key_Minus: setScale( scale() / 1.2 ); break; case Qt::Key_A : if(e->modifiers() & Qt::ControlModifier ) toggleVisualHint( VH_ShowAxis); break; case Qt::Key_P : if(e->modifiers() & Qt::ControlModifier ) toggleVisualHint( VH_ShowPlane); break; default: break; } }
QtTreeWidget::QtTreeWidget(UIEventStream* eventStream, SettingsProvider* settings, MessageTarget messageTarget, QWidget* parent) : QTreeView(parent), eventStream_(eventStream), settings_(settings), messageTarget_(messageTarget) { model_ = new RosterModel(this, settings_->getSetting(QtUISettingConstants::USE_SCREENREADER)); setModel(model_); delegate_ = new RosterDelegate(this, settings_->getSetting(QtUISettingConstants::COMPACT_ROSTER)); setItemDelegate(delegate_); setHeaderHidden(true); #ifdef SWIFT_PLATFORM_MACOSX setAlternatingRowColors(true); #endif setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); expandAll(); setAnimated(true); setIndentation(0); #ifdef SWIFT_EXPERIMENTAL_FT setAcceptDrops(true); #endif setDragEnabled(true); setRootIsDecorated(true); connect(this, SIGNAL(activated(const QModelIndex&)), this, SLOT(handleItemActivated(const QModelIndex&))); connect(model_, SIGNAL(itemExpanded(const QModelIndex&, bool)), this, SLOT(handleModelItemExpanded(const QModelIndex&, bool))); connect(this, SIGNAL(expanded(const QModelIndex&)), this, SLOT(handleExpanded(const QModelIndex&))); connect(this, SIGNAL(collapsed(const QModelIndex&)), this, SLOT(handleCollapsed(const QModelIndex&))); connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(handleClicked(const QModelIndex&))); settings_->onSettingChanged.connect(boost::bind(&QtTreeWidget::handleSettingChanged, this, _1)); QFont lato = font(); lato.setFamily("Lato"); setFont(lato); }
void SpriteAnimator::update(float currentTime) { if (m_animated) { if (!m_animationStarted) { m_animationStarted = true; m_lastUpdateTime = currentTime; } if (currentTime - m_lastUpdateTime > m_frameDuration) { int nextColumn = m_currentColumn + 1; if (nextColumn >= m_numFrames) { nextColumn = 0; if (m_numLoops != INFINITE_LOOP) { --m_numLoops; if (m_numLoops == 0) { nextColumn = m_currentColumn; setAnimated(false); } } } setColumn(nextColumn); m_lastUpdateTime += m_frameDuration; } } else { m_lastUpdateTime = currentTime; } }
ObjectInspectorTable::ObjectInspectorTable(Map *map) : m_map(map), m_graphicsObjectEditor(0) { QStringList tableHeadersLabel; tableHeadersLabel << "Nom" << "Type"; setColumnCount(2); setHeaderLabels(tableHeadersLabel); setAlternatingRowColors(true); setAnimated(true); setSelectionMode(QAbstractItemView::ExtendedSelection); clear(); addDefaultLayout(); connect(this, SIGNAL(itemSelectionChanged()), SLOT(selectionUpdated())); connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(itemWasDoubleClicked(QTreeWidgetItem*,int))); // connexion pour gérer les layouts connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), SLOT(LayoutItemModified(QTreeWidgetItem*,int))); setDragDropMode(QAbstractItemView::DragDrop); }
PlTreeView::PlTreeView( QAbstractItemModel *, QWidget *parent ) : QTreeView( parent ) { setItemDelegate( new PlTreeViewItemDelegate( this ) ); setItemDelegateForColumn( VLCModel::metaToColumn(COLUMN_COVER), new CellPixmapDelegate( this ) ); setIconSize( QSize( 20, 20 ) ); setAlternatingRowColors( true ); setAnimated( true ); setUniformRowHeights( true ); setSortingEnabled( true ); setAttribute( Qt::WA_MacShowFocusRect, false ); viewport()->setAttribute( Qt::WA_Hover ); header()->setSortIndicator( -1 , Qt::AscendingOrder ); header()->setSortIndicatorShown( true ); #if HAS_QT5 header()->setSectionsClickable( true ); #else header()->setClickable( true ); #endif header()->setContextMenuPolicy( Qt::CustomContextMenu ); setSelectionBehavior( QAbstractItemView::SelectRows ); setSelectionMode( QAbstractItemView::ExtendedSelection ); setDragEnabled( true ); setAcceptDrops( true ); setDropIndicatorShown( true ); setContextMenuPolicy( Qt::CustomContextMenu ); }
LayerTreeView::LayerTreeView(IMenuCatalog &menuCatalog, QWidget *parent) : QTreeView(parent) , m_menu(new QMenu(this)) , m_model(nullptr) , m_contexMenuItemIndex() { setSelectionMode(QAbstractItemView::ExtendedSelection); setDragEnabled(true); setAcceptDrops(true); setDropIndicatorShown(true); setAnimated(true); m_menu = menuCatalog.addPopup("CartoUI.LayerTreePopup"); QAction* removeLayerAction = new QAction("Remove layer", m_menu); connect(removeLayerAction, &QAction::triggered, this, &LayerTreeView::onRemoveLayer); m_menu->addAction(removeLayerAction); QAction* showAttributeTableAction = new QAction("Show attributes", m_menu); connect(showAttributeTableAction, &QAction::triggered, this, &LayerTreeView::onShowAttributeTable); m_menu->addAction(showAttributeTableAction); QAction* propertiesAction = new QAction("Properties", m_menu); connect(propertiesAction, &QAction::triggered, this, &LayerTreeView::onPropertyDialog); m_menu->addAction(propertiesAction); }
void ChaseWidget::addOperation( int id ) { if( !m_operations.contains( id ) ) m_operations.push_back( id ); if( m_operations.size() != 0 && !m_animated ) setAnimated( true ); }
KbfxPlasmaCanvasItem::KbfxPlasmaCanvasItem ( QCanvasPixmapArray * a , QCanvas * canvas ) :KbfxPlasmaCanvasAbstractItem ( a, canvas ) { this->setItemMode ( 1 ); setAnimated ( false ); m_desktopFile = 0L; m_isCurrent = false; // m_pixmapArray = a; QPixmap * _img = this->image ( 0 ); m_commentText ="No Comment Set By Plugin"; m_height =_img->height(); m_width =_img->width(); connect ( this,SIGNAL ( clicked() ),this,SLOT ( exec() ) ); m_type = OTHER; // ConfigInit().read(); m_noComments = ConfigInit().m_noComments; m_source = 0; m_margin = ConfigInit().m_commentMargine; m_lineColor = ConfigInit().m_lineColor; m_iconSize = ConfigInit().m_iconSize; m_commentColor = ConfigInit().m_fontAppCommentColor; m_commentFont = ConfigInit().m_fontAppCommentFont; m_fontAppNameColor = ConfigInit().m_fontAppNameColor; m_fontAppNameFont = ConfigInit().m_fontAppNameFont; m_sepNameFont = ConfigInit().m_sepNameFont; m_boldFonts = ConfigInit().m_fontHoverBold; }
TransfersView::TransfersView(QWidget * parent) : QTreeView(parent) { // setItemsExpandable(false); setRootIsDecorated(false); setAnimated(true); setAllColumnsShowFocus(true); header()->setDefaultAlignment(Qt::AlignCenter); header()->setMinimumSectionSize(80); header()->setContextMenuPolicy(Qt::CustomContextMenu); header()->setClickable(true); m_headerMenu = new KMenu(header()); setSelectionMode(QAbstractItemView::ExtendedSelection); setDragEnabled(true); setAcceptDrops(true); setDropIndicatorShown(true); setEditTriggers(QAbstractItemView::NoEditTriggers); setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); connect(header(), SIGNAL(customContextMenuRequested(QPoint)), SLOT(slotShowHeaderMenu(QPoint))); connect(header(), SIGNAL(sectionCountChanged(int,int)), this, SLOT(populateHeaderActions())); connect(header(), SIGNAL(sectionMoved(int,int,int)), this, SLOT(slotSectionMoved(int,int,int))); connect(header(), SIGNAL(sectionResized(int,int,int)), this, SLOT(slotSaveHeader())); connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(slotItemActivated(QModelIndex))); connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(slotItemCollapsed(QModelIndex))); connect(KGet::model(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, SLOT(closeExpandableDetails(QModelIndex,int,int))); }
NickView::NickView(QWidget *parent) : TreeViewTouch(parent) { setIndentation(10); header()->hide(); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setSortingEnabled(true); sortByColumn(0, Qt::AscendingOrder); setContextMenuPolicy(Qt::CustomContextMenu); setSelectionMode(QAbstractItemView::ExtendedSelection); // // breaks with Qt 4.8 // if(QString("4.8.0") > qVersion()) // FIXME breaks with Qt versions >= 4.10! setAnimated(true); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); #if defined Q_OS_MACOS || defined Q_OS_WIN // afaik this is better on Mac and Windows connect(this, SIGNAL(activated(QModelIndex)), SLOT(startQuery(QModelIndex))); #else connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(startQuery(QModelIndex))); #endif }
akuTreeWidget::akuTreeWidget(QWidget *parent) : QTreeWidget(parent) { setDragEnabled(false); setDragDropOverwriteMode(false); setDragDropMode(QAbstractItemView::NoDragDrop); setAlternatingRowColors(true); setSelectionMode(QAbstractItemView::ExtendedSelection); setAutoExpandDelay(-1); setRootIsDecorated(true); setUniformRowHeights(false); setSortingEnabled(true); setAnimated(true); setAllColumnsShowFocus(true); headerItem()->setText(0, i18n("File Name", 0)); headerItem()->setText(1, i18n("Size", 0)); headerItem()->setText(2, i18n("Packed Size", 0)); headerItem()->setText(3, i18n("Ratio", 0)); headerItem()->setText(4, i18n("Modified", 0)); headerItem()->setText(5, i18n("Attributes", 0)); headerItem()->setText(6, i18n("CRC", 0)); headerItem()->setText(7, i18n("Method", 0)); headerItem()->setText(8, i18n("Version", 0)); headerItem()->setText(9, i18n("MIME Type", 0)); headerItem()->setText(10,""); headerItem()->setIcon(10,KIcon("document-properties")); headerItem()->setToolTip(10, i18n("Status: a key is shown if the file is crypted")); header() -> moveSection(10,0); header() -> setResizeMode(10,QHeaderView::ResizeToContents); header() -> setResizeMode(4,QHeaderView::ResizeToContents); setupActions(); }
// 初始化動畫 BouncyLogo::BouncyLogo(QCanvas* canvas) : QCanvasSprite(0,canvas) { static QCanvasPixmapArray logo("qt-trans.xpm"); // 動畫有多個frame setSequence(&logo); // 設定logo setAnimated(TRUE); // 動畫可移動 initPos(); }
EventEditorTreeWidget::EventEditorTreeWidget(QWidget * par) : QTreeWidget(par) { setColumnCount (1); setHeaderLabel(__tr2qs_ctx("Event","editor")); setSelectionMode(QAbstractItemView::ExtendedSelection); setSortingEnabled(true); setRootIsDecorated(true); setAnimated(true); }
void SpriteAnimator::playAnimation(int line, int numFrames, float frameDuration, int numLoops) { setLine(line); setColumn(0); FLAT_ASSERT(numFrames <= getAtlasWidth()); setNumFrames(numFrames); setFrameDuration(frameDuration); setNumLoops(numLoops); setAnimated(true); m_animationStarted = false; }
LogViewListView::LogViewListView(QWidget * pParent) : QTreeWidget(pParent) { header()->setSortIndicatorShown(true); setColumnCount(1); setHeaderLabel(__tr2qs_ctx("Log File","log")); setSelectionMode(QAbstractItemView::SingleSelection); setSortingEnabled(true); setRootIsDecorated(true); setAnimated(true); }
int QMainWindow::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 < 4) qt_static_metacall(this, _c, _id, _a); _id -= 4; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QSize*>(_v) = iconSize(); break; case 1: *reinterpret_cast< Qt::ToolButtonStyle*>(_v) = toolButtonStyle(); break; case 2: *reinterpret_cast< bool*>(_v) = isAnimated(); break; case 3: *reinterpret_cast< bool*>(_v) = documentMode(); break; case 4: *reinterpret_cast< QTabWidget::TabShape*>(_v) = tabShape(); break; case 5: *reinterpret_cast< bool*>(_v) = isDockNestingEnabled(); break; case 6: *reinterpret_cast<int*>(_v) = QFlag(dockOptions()); break; case 7: *reinterpret_cast< bool*>(_v) = unifiedTitleAndToolBarOnMac(); break; } _id -= 8; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setIconSize(*reinterpret_cast< QSize*>(_v)); break; case 1: setToolButtonStyle(*reinterpret_cast< Qt::ToolButtonStyle*>(_v)); break; case 2: setAnimated(*reinterpret_cast< bool*>(_v)); break; case 3: setDocumentMode(*reinterpret_cast< bool*>(_v)); break; case 4: setTabShape(*reinterpret_cast< QTabWidget::TabShape*>(_v)); break; case 5: setDockNestingEnabled(*reinterpret_cast< bool*>(_v)); break; case 6: setDockOptions(QFlag(*reinterpret_cast<int*>(_v))); break; case 7: setUnifiedTitleAndToolBarOnMac(*reinterpret_cast< bool*>(_v)); break; } _id -= 8; } else if (_c == QMetaObject::ResetProperty) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 8; } #endif // QT_NO_PROPERTIES return _id; }
/** \param bd **/ BfBulmaFact::BfBulmaFact ( QString bd ) : BlMainWindow() { BL_FUNC_DEBUG setupUi ( this ); setAnimated ( false ); setUpdatesEnabled ( true ); pWorkspace = new BlWorkspace ( this ); pWorkspace->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); pWorkspace->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); QFrame *m_frame1 = new QFrame(); m_pb = new QProgressBar(); m_pb->setMaximum ( 100 ); m_pb->setMinimum ( 0 ); m_pb->setValue ( 0 ); /// Hacemos que el ProgressBar esté invisible hasta que se seleccione una empresa. m_pb->setVisible ( false ); setCentralWidget ( m_frame1 ); /// Creamos un VerticalLayout donde metemos el contenido central del QMainWindow. QVBoxLayout *vboxlayout = new QVBoxLayout ( this->centralWidget() ); vboxlayout->setSpacing ( 0 ); vboxlayout->setMargin ( 0 ); vboxlayout->addWidget ( pWorkspace ); vboxlayout->addWidget ( m_pb ); m_company = new BfCompany ( this ); m_company->setProgressBar ( m_pb ); m_company->init ( bd, "BulmaFact" ); m_company->setWorkspace ( pWorkspace ); connect ( pWorkspace, SIGNAL ( subWindowActivated ( QMdiSubWindow * ) ), this, SLOT ( informaindexador ( QMdiSubWindow * ) ) ); /// Aqui creamos la ventana dock para meter las distintas ventanas. m_list = new BlWindowListDock ( 0 ); m_list->setVisible ( false ); /// Iniciamos el listventanas con el workspace para que pueda operar con el. m_list->setWorkspace ( pWorkspace ); connect ( m_list, SIGNAL ( visibilityStateChanged ( bool ) ), this, SLOT ( setActionIndexador ( bool ) ) ); addDockWidget ( Qt::LeftDockWidgetArea, m_list ); m_company->setListVentanas ( m_list ); m_list->setVisible ( true ); m_pb->setVisible ( false ); statusBar() ->showMessage ( bd, 2000 ); setWindowTitle ( bd ); }
FolderSelectionWidget::FolderSelectionWidget(FolderSelectionModel *pModel, QWidget *pParent) : QTreeView(pParent), mModel(pModel) { mModel->setRootPath(QStringLiteral("/")); mModel->setParent(this); setAnimated(true); setModel(mModel); ConfigIncludeDummy *lIncludeDummy = new ConfigIncludeDummy(mModel, this); lIncludeDummy->setObjectName(QStringLiteral("kcfg_Paths included")); ConfigExcludeDummy *lExcludeDummy = new ConfigExcludeDummy(mModel, this); lExcludeDummy->setObjectName(QStringLiteral("kcfg_Paths excluded")); setHeaderHidden(true); }
void ChaseWidget::removeOperation( int id ) { if( !m_operations.contains( id ) ) return; int index = m_operations.indexOf( id ); if( index != -1 ){ m_operations.remove( index ); } if( m_operations.size() == 0 ) setAnimated( false ); }
AutoExpandingTreeView::AutoExpandingTreeView(QWidget* parent) : QTreeView(parent), auto_open_(true), expand_on_reset_(true), add_on_double_click_(true), ignore_next_click_(false) { setExpandsOnDoubleClick(false); setAnimated(true); connect(this, SIGNAL(expanded(QModelIndex)), SLOT(ItemExpanded(QModelIndex))); connect(this, SIGNAL(clicked(QModelIndex)), SLOT(ItemClicked(QModelIndex))); connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(ItemDoubleClicked(QModelIndex))); }
void Bullet::checkCollision() { QCanvasItem* item; QCanvasItemList l=collisions(FALSE); for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { item = *it; if ( (item->rtti()== 1500) && (item->collidesWith(this)) ) { Man* deadman = (Man*)item; if (deadman->frame() != 5) return; deadman->done(); emit score(10); setShotCount(shotcount+1); setAnimated(false); nobullets--; delete this; return; } else if ( (item->rtti()==1900) && (item->collidesWith(this)) ) { Helicopter* deadchopper = (Helicopter*) item; deadchopper->done(); emit score(50); setAnimated(false); nobullets--; delete this; return; } } //check shot is not out of bounds if ( (y() < 0) || (x() < 0) || (y() > canvas()->height()) || ( x() > canvas()->width())) { setAnimated(false); nobullets--; delete this; return; } }
MainWindow::MainWindow() { createActions(); createMenus(); createToolBars(); createDockWindows(); createStatusBar(); setWindowTitle(tr("Movie Player")); setUnifiedTitleAndToolBarOnMac(true); setAnimated(true); setDockNestingEnabled (true); runTestCuda(); resize(300, 400); }
FlyingDisk::FlyingDisk() { setPos_x(0.0); setPos_y(4.0); setPos_z(10.0); setRotationAngleOnXXaxis(0.0); setRotationAngleOnYYaxis(0.0); setRotationAngleOnZZaxis(0.0); setAnimated(false); /** Defines control points */ GLfloat control_points[][3] = { {-3 + 0.3, 0, 3}, {-3 / 2, 0, 3 + 1.5}, {3 / 2, 0, 3 + 1.5}, {3 - 0.3, 0, 3}, {-3 - 1.5, 0, 3 / 2}, {-3 / 2, 5, 3 / 2}, {3 / 2, 5, 3 / 2}, {3 + 1.5, 0, 3 / 2}, {-3 - 1.5, 0, -3 / 2}, {-3 / 2, 5, -3 / 2}, {3 / 2, 5, -3 / 2}, {3 + 1.5, 0, -3 / 2}, {-3 + 0.3, 0, -3}, {-3 / 2, 0, -3 - 1.5}, {3 / 2, 0, -3 - 1.5}, {3 - 0.3, 0, -3} }; topPart = new Patch(3, 3, 20, 20, control_points, 16, 3); disk = new Cylinder(9, 9, 0.5, 255, 10); diskBottomAppearance = new CGFappearance("../textures/disk_down.png",GL_CLAMP,GL_CLAMP); diskTopAppearance = new CGFappearance("../textures/disk_up.png", GL_CLAMP,GL_CLAMP); topAppearance = new CGFappearance("../textures/top.png", GL_CLAMP,GL_CLAMP); topPart->setTexture(topAppearance); disk->setBottomTexture(diskBottomAppearance); disk->setTopTexture(diskTopAppearance); }
TabsTreeView( QWidget *parent = 0 ) : Amarok::PrettyTreeView( parent ) { setAttribute( Qt::WA_NoSystemBackground ); viewport()->setAutoFillBackground( false ); setHeaderHidden( true ); setIconSize( QSize( 36, 36 ) ); setDragDropMode( QAbstractItemView::DragOnly ); setSelectionMode( QAbstractItemView::SingleSelection ); setSelectionBehavior( QAbstractItemView::SelectItems ); setAnimated( true ); setRootIsDecorated( false ); setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); setFixedWidth( 48 ); }
ComponentView::ComponentView(Model* model, EntityTemplate* entity, QWidget* parent):QTreeWidget(parent),model_(model),entity_(entity) { setMaximumWidth(400.f); setHeaderHidden(true); setIndentation(12); setExpandsOnDoubleClick(false); setAnimated(true); QPalette pal; pal.setColor(QPalette::Base, QColor(244,244,244)); pal.setColor(QPalette::AlternateBase, QColor(234,234,234)); setPalette(pal); setAutoFillBackground(true); treeModel_ = std::unique_ptr<ComponentViewModel>(new ComponentViewModel(this, model_, entity_)); connect(this, SIGNAL(clicked(const QModelIndex &)), this, SLOT(singleClickExpand(const QModelIndex &))); }
QtChatListWindow::QtChatListWindow(UIEventStream *uiEventStream, QWidget* parent) : QTreeView(parent) { eventStream_ = uiEventStream; bookmarksEnabled_ = false; model_ = new ChatListModel(); setModel(model_); delegate_ = new ChatListDelegate(); setItemDelegate(delegate_); setHeaderHidden(true); #ifdef SWIFT_PLATFORM_MACOSX setAlternatingRowColors(true); #endif expandAll(); setAnimated(true); setIndentation(0); setRootIsDecorated(true); setupContextMenus(); connect(this, SIGNAL(activated(const QModelIndex&)), this, SLOT(handleItemActivated(const QModelIndex&))); connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(handleClicked(const QModelIndex&))); }
CWizFolderView::CWizFolderView(CWizExplorerApp& app, QWidget *parent) : QTreeWidget(parent) , m_app(app) , m_dbMgr(app.databaseManager()) { header()->hide(); setAnimated(true); setAttribute(Qt::WA_MacShowFocusRect, false); setStyle(::WizGetStyle(m_app.userSettings().skin())); // use custom scrollbar setVerticalScrollMode(QAbstractItemView::ScrollPerItem); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_vScroll = new CWizScrollBar(this); m_vScroll->syncWith(verticalScrollBar()); initFolders(); }
int QStateMachine::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QState::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 7) qt_static_metacall(this, _c, _id, _a); _id -= 7; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = errorString(); break; case 1: *reinterpret_cast< RestorePolicy*>(_v) = globalRestorePolicy(); break; case 2: *reinterpret_cast< bool*>(_v) = isAnimated(); break; } _id -= 3; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 1: setGlobalRestorePolicy(*reinterpret_cast< RestorePolicy*>(_v)); break; case 2: setAnimated(*reinterpret_cast< bool*>(_v)); break; } _id -= 3; } else if (_c == QMetaObject::ResetProperty) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 3; } #endif // QT_NO_PROPERTIES return _id; }
Cannon::Cannon(QCanvas* canvas) : QCanvasSprite(0, canvas) { shotsfired=0; index = 8; cannonx = 0; cannony = 0; cannonarray = new QCanvasPixmapArray(); QString c0 = Opie::Core::OResource::findPixmap("parashoot/can0001"); c0.replace(QRegExp("0001"),"%1"); cannonarray->readPixmaps(c0,17); setSequence(cannonarray); setFrame(index); reposition(); movedir = NoDir; moveDelay = 0; setAnimated(TRUE); show(); }