HierarchyList::HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects ) : QListView( parent ), formWindow( fw ) { init_colors(); setDefaultRenameAction( Accept ); header()->setMovingEnabled( false ); header()->setStretchEnabled( true ); normalMenu = 0; tabWidgetMenu = 0; addColumn( i18n("Name" ) ); addColumn( i18n("Class" ) ); QPalette p( palette() ); p.setColor( QColorGroup::Base, QColor( *backColor2 ) ); (void)*selectedBack; // hack setPalette( p ); disconnect( header(), SIGNAL( sectionClicked( int ) ), this, SLOT( changeSortColumn( int ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); if ( doConnects ) { connect( this, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( objectClicked( QListViewItem * ) ) ); connect( this, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( objectClicked( QListViewItem * ) ) ); connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint&, int ) ), this, SLOT( showRMBMenu( QListViewItem *, const QPoint & ) ) ); } deselect = true; setColumnWidthMode( 1, Manual ); }
KVocTrainTable::KVocTrainTable(kvoctrainDoc *doc, const LangSet *ls, QWidget *parent, const char *name) : QTable(parent, name), langs(ls) { m_doc = doc; defaultItem = 0; setNumCols(m_doc->numLangs()); setNumRows(m_doc->numEntries()); setLeftMargin(0); setSelectionMode(MultiRow); setColumnMovingEnabled(false); setRowMovingEnabled(false); setSorting(false); setDoc(m_doc); triggerSect = -1; m_pixInQuery = QPixmap(KGlobal::iconLoader()->loadIcon("ok", KIcon::Small)); m_pixInactive = QPixmap(KGlobal::iconLoader()->loadIcon("no", KIcon::Small)); delayTimer = new QTimer(this); connect(delayTimer, SIGNAL(timeout()), this, SLOT(menuTriggerTimeout())); QHeader *header = horizontalHeader(); connect(header, SIGNAL(pressed(int)), this, SLOT(headerPressEvent(int))); connect(header, SIGNAL(released(int)), this, SLOT(headerReleaseEvent(int))); connect(this, SIGNAL(currentChanged(int, int)), this, SLOT(slotCurrentChanged(int, int))); }
KMListView::KMListView(TQWidget *parent, const char *name) : TQListView(parent,name) { m_items.setAutoDelete(false); addColumn(""); header()->hide(); setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); setLineWidth(1); setSorting(0); connect(this,TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)),TQT_SLOT(slotRightButtonClicked(TQListViewItem*,const TQPoint&,int))); connect(this,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged())); connect(this,TQT_SIGNAL(onItem(TQListViewItem*)),TQT_SLOT(slotOnItem(TQListViewItem*))); connect(this,TQT_SIGNAL(onViewport()),TQT_SLOT(slotOnViewport())); m_root = new KMListViewItem(this,i18n("Print System")); m_root->setPixmap(0,SmallIcon("tdeprint_printer")); m_root->setOpen(true); m_classes = new KMListViewItem(m_root,i18n("Classes")); m_classes->setPixmap(0,SmallIcon("package")); m_classes->setOpen(true); m_printers = new KMListViewItem(m_root,i18n("Printers")); m_printers->setPixmap(0,SmallIcon("package")); m_printers->setOpen(true); m_specials = new KMListViewItem(m_root,i18n("Specials")); m_specials->setPixmap(0,SmallIcon("package")); m_specials->setOpen(true); sort(); }
/********************************************************************** * * KivioIconView * **********************************************************************/ KivioIconView::KivioIconView( bool _readWrite,QWidget *parent, const char *name ) : QIconView( parent, name ) { m_pSpawnerSet = NULL; m_pCurDrag = NULL; isReadWrite=_readWrite; objList.append(this); setGridX( 64 ); setGridY( 64 ); setResizeMode( Adjust ); setWordWrapIconText(true); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( Auto ); setAutoArrange(true); setSorting(true); setItemsMovable(false); setArrangement(LeftToRight); setAcceptDrops(false); viewport()->setAcceptDrops(false); if(isReadWrite) { connect(this, SIGNAL(doubleClicked(QIconViewItem*)), this, SLOT(slotDoubleClicked(QIconViewItem*))); connect(this, SIGNAL(clicked(QIconViewItem*)), this, SLOT(slotClicked(QIconViewItem*))); } }
DbTable::DbTable( int numRows, int numCols, QWidget *parent, const char *name) : QTable(numRows, numCols, parent, name) { setSorting( TRUE ); // adjustColumn( 0 ); }
KOAttendeeListView::KOAttendeeListView ( QWidget *parent ) : K3ListView( parent ) { setAcceptDrops( true ); setAllColumnsShowFocus( true ); setSorting( -1 ); }
Workspace::Workspace( QWidget *parent, MainWindow *mw ) : QListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), project( 0 ), completionDirty( FALSE ) { init_colors(); setDefaultRenameAction( Accept ); blockNewForms = FALSE; bufferEdit = 0; header()->setStretchEnabled( TRUE ); header()->hide(); setSorting( 0 ); setResizePolicy( QScrollView::Manual ); #ifndef Q_WS_MAC QPalette p( palette() ); p.setColor( QColorGroup::Base, QColor( *backColor2 ) ); (void)*selectedBack; // hack setPalette( p ); #endif addColumn( tr( "Files" ) ); setAllColumnsShowFocus( TRUE ); connect( this, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ), this, SLOT( itemClicked( int, QListViewItem *, const QPoint& ) ) ), connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( itemDoubleClicked( QListViewItem * ) ) ), connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ), this, SLOT( rmbClicked( QListViewItem *, const QPoint& ) ) ), setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); viewport()->setAcceptDrops( TRUE ); setAcceptDrops( TRUE ); setColumnWidthMode( 1, Manual ); }
KOAttendeeListView::KOAttendeeListView ( QWidget *parent, const char *name ) : KListView(parent, name) { setAcceptDrops( true ); setAllColumnsShowFocus( true ); setSorting( -1 ); }
VariablesListView::VariablesListView(QWidget *parent, const char *name) : KListView(parent, name), m_variables(0), m_isReadOnly(false) { setAllColumnsShowFocus(true); setRootIsDecorated(true); setSorting(-1); addColumn(tr2i18n("Name")); addColumn(tr2i18n("Value")); addColumn(tr2i18n("Type")); setColumnWidthMode(NameCol, Manual); setColumnWidthMode(ValueCol, Manual); setColumnWidthMode(TypeCol, Manual); setColumnWidth(NameCol, 150); setColumnWidth(ValueCol, 150); setColumnWidth(TypeCol, 150); connect(this, SIGNAL(expanded(QListViewItem*)), this, SLOT(slotItemExpanded(QListViewItem*))); connect(this, SIGNAL(collapsed(QListViewItem*)), this, SLOT(slotItemCollapsed(QListViewItem*))); connect(this, SIGNAL(itemRenamed(QListViewItem*, int, const QString&)), this, SLOT(slotItemRenamed(QListViewItem*, int, const QString&))); connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int )), this, SLOT(slotDoubleClick( QListViewItem *, const QPoint &, int ))); //connect(m_menu, SIGNAL(activated(int)), this, SLOT(slotCopyVarToClipboard(int))); connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint& , int)), this, SLOT(slotContextMenuRequested(QListViewItem *, const QPoint &, int))); }
VariableTree::VariableTree(VariableWidget *parent, const char *name) : KListView(parent, name), QToolTip( viewport() ), activationId_(0), currentThread_(-1), selectedFrame_(0), watchRoot_(0), globalRoot_(0) { setRootIsDecorated(true); setAllColumnsShowFocus(true); setColumnWidthMode(0, Manual); setSorting(VAR_NAME_COLUMN); QListView::setSelectionMode(QListView::Single); addColumn(i18n("Variable"), 100 ); addColumn(i18n("Value"), 100 ); connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), SLOT(slotContextMenu(KListView*, QListViewItem*)) ); connect( this, SIGNAL(pressed(QListViewItem*)), this, SLOT(slotPressed(QListViewItem*)) ); watchRoot_ = new WatchRoot(this); }
K3bFileTreeView::K3bFileTreeView( QWidget *parent, const char *name ) : KFileTreeView( parent, name ) { d = new Private(); d->toolTip = new K3bDeviceTreeToolTip( viewport(), this ); addColumn( i18n("Directories") ); setDragEnabled( true ); setAlternateBackground( QColor() ); setFullWidth(true); // setRootIsDecorated(true); setSorting(0); m_dirOnlyMode = true; m_menuEnabled = false; connect( this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemExecuted(QListViewItem*)) ); connect( this, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(slotItemExecuted(QListViewItem*)) ); connect( this, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint& )), this, SLOT(slotContextMenu(KListView*, QListViewItem* , const QPoint& )) ); // we always simulate the single click slotSettingsChangedK3b(KApplication::SETTINGS_MOUSE); if( kapp ) connect( kapp, SIGNAL(settingsChanged(int)), SLOT(slotSettingsChangedK3b(int)) ); initActions(); }
KSim::MonitorPrefs::MonitorPrefs(TQWidget *parent, const char *name) : TDEListView(parent, name) { addColumn(i18n("Monitor")); addColumn(i18n("Description")); addColumn(i18n("LMB Command")); setItemsRenameable(true); setRenameable(0, false); setRenameable(2, true); setDragEnabled(true); setAcceptDrops(true); setAllColumnsShowFocus(true); setSelectionMode(TQListView::Single); // Scan for .desktop files and enter them into the TDEListView m_locatedFiles = TDEGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop"); m_locatedFiles.sort(); TQStringList::ConstIterator it; for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) { KDesktopFile file((*it), true); (void)(new TQCheckListItem(this, file.readName(), TQCheckListItem::CheckBox))->setText(1, file.readComment()); } sort(); setSorting(-1, false); }
SnippetWidget::SnippetWidget(SnippetPart *part) : KListView(0, "snippet widget"), QToolTip( viewport() ), m_part( part ) { // init the QPtrList _list.setAutoDelete(TRUE); // init the KListView setSorting( -1 ); addColumn( "" ); setFullWidth(true); header()->hide(); setAcceptDrops(true); setDragEnabled(false); setDropVisualizer(false); setRootIsDecorated(true); //connect the signals connect( this, SIGNAL( contextMenuRequested ( QListViewItem *, const QPoint & , int ) ), this, SLOT( showPopupMenu(QListViewItem *, const QPoint & , int ) ) ); connect( this, SIGNAL( executed (QListViewItem *) ), this, SLOT( slotExecuted( QListViewItem *) ) ); connect( this, SIGNAL( returnPressed (QListViewItem *) ), this, SLOT( slotExecuted( QListViewItem *) ) ); connect( this, SIGNAL( dropped(QDropEvent *, QListViewItem *) ), this, SLOT( slotDropped(QDropEvent *, QListViewItem *) ) ); _cfg = 0; QTimer::singleShot(0, this, SLOT(initConfig())); }
CXmlPropertyList::CXmlPropertyList( CXmlPropertyEditor *e ) : PropertyList( e ), editor( e ) { init_colors(); whatsThis = new PropertyWhatsThis( this ); showSorted = FALSE; header()->setMovingEnabled( FALSE ); header()->setStretchEnabled( TRUE ); setResizePolicy( QScrollView::Manual ); viewport()->setAcceptDrops( false ); viewport()->installEventFilter( this ); addColumn( tr( "Property" ) ); addColumn( tr( "Value" ) ); connect( header(), SIGNAL( sizeChange( int, int, int ) ), this, SLOT( updateEditorSize() ) ); connect( header(), SIGNAL( sectionClicked( int ) ), this, SLOT( toggleSort() ) ); connect( this, SIGNAL( pressed( QListViewItem *, const QPoint &, int ) ), this, SLOT( itemPressed( QListViewItem *, const QPoint &, int ) ) ); connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( toggleOpen( QListViewItem * ) ) ); disconnect( header(), SIGNAL( sectionClicked( int ) ), this, SLOT( changeSortColumn( int ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); setColumnWidthMode( 1, Manual ); mousePressed = FALSE; pressItem = 0; theLastEvent = MouseEvent; header()->installEventFilter( this ); }
EvaListView::EvaListView(TQWidget *parent, const char *name, WFlags f) : TQListView(parent, name, f) { setItemMargin(EVA_LV_LEFT_MARGIN); addColumn("1"); setColumnWidthMode( 0, Manual); // addColumn("2"); // setColumnWidthMode( 1, Manual); header()->hide(); setSorting(0); setRootIsDecorated( false ); setTreeStepSize( 8 ); setDragAutoScroll(true); setHScrollBarMode(TQScrollView::AlwaysOff); setFrameShape( TQFrame::NoFrame ); setAcceptDrops( true ); setSelectionMode( TQListView::Extended ); setSelectionMode(TQListView::Single); m_tooltip = new EvaLVToolTip(this); clearWFlags( WStaticContents ); setWFlags( WNoAutoErase ); static_cast<EvaListView*>(viewport())->clearWFlags( WStaticContents ); static_cast<EvaListView*>(viewport())->setWFlags( WNoAutoErase ); codec = TQTextCodec::codecForName("GB18030"); }
KexiFieldListView::KexiFieldListView(QWidget *parent, const char *name, int options) : KListView(parent, name) , m_schema(0) , m_keyIcon(SmallIcon("key")) , m_noIcon(KexiUtils::emptyIcon(KIcon::Small)) , m_options(options) , m_allColumnsItem(0) { setAcceptDrops(true); viewport()->setAcceptDrops(true); setDropVisualizer(false); setDropHighlighter(true); setAllColumnsShowFocus(true); addColumn(i18n("Field Name")); if (m_options & ShowDataTypes) addColumn(i18n("Data Type")); if (m_options & AllowMultiSelection) setSelectionMode(QListView::Extended); setResizeMode(QListView::LastColumn); // header()->hide(); setSorting(-1, true); // disable sorting setDragEnabled(true); connect(this, SIGNAL(doubleClicked(QListViewItem*, const QPoint &, int)), this, SLOT(slotDoubleClicked(QListViewItem*))); }
toListView::toListView(QWidget *parent, const char *name, Qt::WFlags f) : toTreeWidget(parent, name, f), toEditWidget(false, true, true, false, false, false, false, false, true, true, false) { setTreeStepSize(15); setSelectionMode(Extended); setAllColumnsShowFocus(true); setSorting(-1); Menu = NULL; setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(displayMenu(const QPoint &))); QString str(toConfigurationSingle::Instance().listFont()); if (!str.isEmpty()) { QFont font(toStringToFont(str)); setFont(font); } LastMove = QPoint(-1, -1); }
LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name) : K3ListView(parent) , partConfig(cfg) { setObjectName(name); setAllColumnsShowFocus(true); setShowToolTips(false); setShowSortIndicator(true); setMultiSelection(true); setSorting(LogListViewItem::Revision, false); addColumn(i18n("Revision")); addColumn(i18n("Author")); addColumn(i18n("Date")); addColumn(i18n("Branch")); addColumn(i18n("Comment")); addColumn(i18n("Tags")); Cervisia::ToolTip* toolTip = new Cervisia::ToolTip(viewport()); connect(toolTip, SIGNAL(queryToolTip(QPoint,QRect&,QString&)), this, SLOT(slotQueryToolTip(QPoint,QRect&,QString&))); // without this restoreLayout() can't change the column widths for (int i = 0; i < columns(); ++i) setColumnWidthMode(i, Manual); restoreLayout(&partConfig, QLatin1String("LogList view")); }
void toResultLong::query(const QString &sql, const toQueryParams ¶m) { setSqlAndParams(sql, param); slotStop(); Query = NULL; LastItem = NULL; RowNumber = 0; First = true; clear(); setSorting( -1); if (NumberColumn) { addColumn(QString::fromLatin1("#")); setColumnAlignment(0, Qt::AlignRight); } if (Filter) Filter->startingQuery(); try { Query = new toEventQuery(this , connection() , sql , param //, Statistics , toEventQuery::READ_ALL ); connect(Query, SIGNAL(dataAvailable(toEventQuery*)), this, SLOT(slotAddItem())); connect(Query, SIGNAL(done(toEventQuery*)), this, SLOT(slotQueryDone())); if (ReadAll) { MaxNumber = -1; //// Query->slotReadAll(); // indicate that all records should be fetched } else MaxNumber = toConfigurationNewSingle::Instance().option(ToConfiguration::Database::InitialFetchInt).toInt(); Query->start(); } catch (const toConnection::exception &str) { First = false; emit firstResult(toResult::sql(), str, true); emit done(); //// if (Mode != toQuery::Long) Utils::toStatusMessage(str); } catch (const QString &str) { First = false; emit firstResult(toResult::sql(), str, true); emit done(); //// if (Mode != toQuery::Long) Utils::toStatusMessage(str); } updateContents(); }
KMMimePartTree::KMMimePartTree( KMReaderWin* readerWin, QWidget* parent, const char* name ) : KListView( parent, name ), mReaderWin( readerWin ), mSizeColumn(0) { setStyleDependantFrameWidth(); addColumn( i18n("Description") ); addColumn( i18n("Type") ); addColumn( i18n("Encoding") ); mSizeColumn = addColumn( i18n("Size") ); setColumnAlignment( 3, Qt::AlignRight ); restoreLayoutIfPresent(); connect( this, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( itemClicked( QListViewItem* ) ) ); connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int ) ), this, SLOT( itemRightClicked( QListViewItem*, const QPoint& ) ) ); setSelectionMode( QListView::Extended ); setRootIsDecorated( false ); setAllColumnsShowFocus( true ); setShowToolTips( true ); setSorting(-1); setDragEnabled( true ); }
DBGProfileListView::DBGProfileListView(QWidget *parent, const char *name) : KListView(parent, name), m_view(ModuleView) { setSorting(-1); setAllColumnsShowFocus(true); setRootIsDecorated(true); addColumn("Location"); addColumn("Line"); addColumn("Hits"); addColumn("Avarage time (ms)"); addColumn("Total time (ms)"); addColumn("Min time (ms)"); addColumn("Max time (ms)"); // addColumn("Chart"); setColumnAlignment(LineCol, Qt::AlignHCenter); setColumnAlignment(HitsCol, Qt::AlignHCenter); setColumnAlignment(AvgCol, Qt::AlignHCenter); setColumnAlignment(TotalCol, Qt::AlignHCenter); setColumnAlignment(MinCol, Qt::AlignHCenter); setColumnAlignment(MaxCol, Qt::AlignHCenter); connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int )), this, SLOT(slotDoubleClick(QListViewItem *, const QPoint &, int ))); }
void MailListView::defineSort(int column, bool ascend) { sortColumn = column; ascending = ascend; setSorting(sortColumn, ascending); }
void DolphinView::setViewProperties(const ViewProperties& props) { setMode(props.viewMode()); setSorting(props.sorting()); setSortOrder(props.sortOrder()); setShowHiddenFilesEnabled(props.isShowHiddenFilesEnabled()); }
KDirListBox::KDirListBox( bool s, QDir::SortSpec sorting, QWidget * parent , const char * name ) : QListBox(parent, name) , KFileInfoContents(s,sorting) { _acceptFiles = false; setSortMode(Increasing); setSorting(QDir::Name); }
DataViewTable::DataViewTable(QWidget* parent, const char* name) : QTable(parent, name), sort_column_(-1), selector_(NULL) { setNumRows(0); setNumCols(0); setShowGrid(true); setSelectionMode(QTable::MultiRow); setSorting(true); }
ConstraintTable::ConstraintTable(QWidget * parent, ConstraintCanvas * c) : Q3Table(c->elements.count(), 4, parent) { setSorting(true); setSelectionMode(NoSelection); setRowMovingEnabled(FALSE); horizontalHeader()->setLabel(0, TR("visible")); horizontalHeader()->setLabel(1, " "); horizontalHeader()->setLabel(2, TR("element")); horizontalHeader()->setLabel(3, TR("constraint")); setColumnStretchable(0, FALSE); setColumnStretchable(1, FALSE); int row; bool v = c->indicate_visible; Q3ValueList<BrowserNode *> & hv = c->hidden_visible; BrowserNodeList & elts = c->elements; BrowserNode * bn; QString yes = TR(" yes"); QString empty; elts.sort(); for (bn = elts.first(), row = 0; bn != 0; bn = elts.next(), row += 1) { if ((v) ? hv.findIndex(bn) != -1 : hv.findIndex(bn) == -1) setText(row, 0, yes); setPixmap(row, 1, *(bn->pixmap(0))); TableItem * ti; ti = new TableItem(this, Q3TableItem::Never, bn->full_name(TRUE)); ti->setReplaceable(FALSE); setItem(row, 2, ti); QString s = toUnicode(bn->constraint()); int n = s.count('\n'); ti = new TableItem(this, Q3TableItem::Never, s); ti->setReplaceable(FALSE); setItem(row, 3, ti); if (n != 0) { // note : adjustRow(row) does nothing setRowHeight(row, rowHeight(row) * (n + 1)); } } adjustColumn(0); adjustColumn(1); setColumnStretchable(2, TRUE); setColumnStretchable(3, TRUE); connect(this, SIGNAL(pressed(int, int, int, const QPoint &)), this, SLOT(button_pressed(int, int, int, const QPoint &))); }
void OcCombinedModelFilter::setOrderBy(const QString &nOrderBy) { if (nOrderBy != m_orderBy) { m_orderBy = nOrderBy; QLOG_DEBUG() << "Combined model filter: Changed order by to " << orderBy(); setSorting(); emit orderByChanged(orderBy()); } }
int Q3Table::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = Q3ScrollView::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 58) qt_static_metacall(this, _c, _id, _a); _id -= 58; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< int*>(_v) = numRows(); break; case 1: *reinterpret_cast< int*>(_v) = numCols(); break; case 2: *reinterpret_cast< bool*>(_v) = showGrid(); break; case 3: *reinterpret_cast< bool*>(_v) = rowMovingEnabled(); break; case 4: *reinterpret_cast< bool*>(_v) = columnMovingEnabled(); break; case 5: *reinterpret_cast< bool*>(_v) = isReadOnly(); break; case 6: *reinterpret_cast< bool*>(_v) = sorting(); break; case 7: *reinterpret_cast< SelectionMode*>(_v) = selectionMode(); break; case 8: *reinterpret_cast< FocusStyle*>(_v) = focusStyle(); break; case 9: *reinterpret_cast< int*>(_v) = numSelections(); break; } _id -= 10; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setNumRows(*reinterpret_cast< int*>(_v)); break; case 1: setNumCols(*reinterpret_cast< int*>(_v)); break; case 2: setShowGrid(*reinterpret_cast< bool*>(_v)); break; case 3: setRowMovingEnabled(*reinterpret_cast< bool*>(_v)); break; case 4: setColumnMovingEnabled(*reinterpret_cast< bool*>(_v)); break; case 5: setReadOnly(*reinterpret_cast< bool*>(_v)); break; case 6: setSorting(*reinterpret_cast< bool*>(_v)); break; case 7: setSelectionMode(*reinterpret_cast< SelectionMode*>(_v)); break; case 8: setFocusStyle(*reinterpret_cast< FocusStyle*>(_v)); break; } _id -= 10; } else if (_c == QMetaObject::ResetProperty) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 10; } #endif // QT_NO_PROPERTIES return _id; }
//----------------------------------------------------------------------------- ScoresList::ScoresList(QWidget *parent) : KListView(parent) { setSelectionMode(QListView::NoSelection); setItemMargin(3); setAllColumnsShowFocus(true); setSorting(-1); header()->setClickEnabled(false); header()->setMovingEnabled(false); }
TableEditor::TableEditor(int ncol,QWidget *p) : Q3Table(0,ncol,p) { //verticalHeader()->hide(); //setLeftMargin(0); setSorting(1); //setSelectionMode(QTable::MultiRow); //addEmptyRow(); connect(this,SIGNAL(contextMenuRequested(int,int,const QPoint &)), SLOT(contextMenu(int,int,const QPoint &))); }