XbelTree::XbelTree(QWidget *parent) : QTreeWidget(parent) { QStringList labels; labels << QString::fromUtf8("Наименование параметра") << QString::fromUtf8("Значение параметра"); header()->setResizeMode(QHeaderView::Stretch); header()->setStyleSheet( "font: bold italic; background-color: green;" ); setHeaderLabels(labels); folderIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirClosedIcon), QIcon::Normal, QIcon::Off); folderIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirOpenIcon), QIcon::Normal, QIcon::On); bookmarkIcon.addPixmap(style()->standardPixmap(QStyle::SP_FileIcon)); keywords["address"] = _address; keywords["comport"] = _comport; keywords["registers"] = _registers; keywords["cycle"] = _cycle; keywords["proto"] = _proto; keywords["maska"] = _maska; keywords["begin_TU"] = _begin_TU; keywords["end_TU"] = _end_TU; keywords["tic"] = _tic; keywords["mqpassword"] = _mqpassword; keywords["potential"] = _potential; keywords["current"] = _current; keywords["power-A"] = _powerA; keywords["power-Q"] = _powerQ; keywords["power-S"] = _powerS; }
QTreeWidget *ConnectionPropertiesPanel::makePortListWidget(QWidget *parent, const GraphConnectionEndpoint &ep, std::map<QTreeWidgetItem *, QString> &itemToKey) { //create list widget auto listWidget = new QTreeWidget(parent); listWidget->setColumnCount(1); listWidget->setHeaderLabels(QStringList(QString("%1[%2]").arg(ep.getObj()->getId(), ep.getKey().id))); //query the signal/slot ports QStringList portKeys; auto block = dynamic_cast<GraphBlock *>(ep.getObj().data()); if (block != nullptr) switch(ep.getConnectableAttrs().direction) { case GRAPH_CONN_SLOT: portKeys = block->getSlotPorts(); break; case GRAPH_CONN_SIGNAL: portKeys = block->getSignalPorts(); break; default: break; } //populate if (portKeys.empty()) { auto item = new QTreeWidgetItem(listWidget, QStringList(_conn->getKeyName(ep.getKey().id, ep))); itemToKey[item] = ep.getKey().id; listWidget->addTopLevelItem(item); } else for (const auto &portKey : portKeys) { auto item = new QTreeWidgetItem(listWidget, QStringList(_conn->getKeyName(portKey, ep))); itemToKey[item] = portKey; listWidget->addTopLevelItem(item); } listWidget->resizeColumnToContents(0); //return new widget return listWidget; }
QgsSettingsTree::QgsSettingsTree( QWidget *parent ) : QTreeWidget( parent ) { setItemDelegate( new QgsVariantDelegate( this ) ); QStringList labels; labels << tr( "Setting" ) << tr( "Type" ) << tr( "Value" ) << tr( "Description" ); setHeaderLabels( labels ); // header()->setResizeMode( 0, QHeaderView::Stretch ); // header()->setResizeMode( 2, QHeaderView::Stretch ); header()->resizeSection( 0, 250 ); header()->resizeSection( 1, 100 ); header()->resizeSection( 2, 100 ); settings = nullptr; refreshTimer.setInterval( 2000 ); autoRefresh = false; groupIcon.addPixmap( style()->standardPixmap( QStyle::SP_DirClosedIcon ), QIcon::Normal, QIcon::Off ); groupIcon.addPixmap( style()->standardPixmap( QStyle::SP_DirOpenIcon ), QIcon::Normal, QIcon::On ); keyIcon.addPixmap( style()->standardPixmap( QStyle::SP_FileIcon ) ); connect( &refreshTimer, &QTimer::timeout, this, &QgsSettingsTree::maybeRefresh ); }
EnfuseStackList::EnfuseStackList(QWidget* const parent) : QTreeWidget(parent), d(new Private) { d->progressTimer = new QTimer(this); setContextMenuPolicy(Qt::CustomContextMenu); setIconSize(QSize(64, 64)); setSelectionMode(QAbstractItemView::SingleSelection); setSortingEnabled(false); setAllColumnsShowFocus(true); setRootIsDecorated(false); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setColumnCount(3); setHeaderHidden(false); setDragEnabled(false); header()->setSectionResizeMode(QHeaderView::Stretch); QStringList labels; labels.append( i18nc("@title:column Saving checkbox", "Include during Saving") ); labels.append( i18nc("@title:column Output file name", "Output") ); labels.append( i18nc("@title:column Source file names", "Selected Inputs") ); setHeaderLabels(labels); connect(this, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(slotItemClicked(QTreeWidgetItem*))); connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint))); connect(d->progressTimer, SIGNAL(timeout()), this, SLOT(slotProgressTimerDone())); }
START_NS ProposalTreeWidget::ProposalTreeWidget(QWidget * p) : QTreeWidget(p), mOverlay(new Overlay(this)), mAddRemoveEnabled(false), mSolutionSelectionMultiple(true) //mSolutionDelegate(new SolutionCheckDelegate(this) ) { setDragEnabled(true); setDragDropMode(InternalMove); viewport()->setAcceptDrops(true); setDropIndicatorShown(true); setSelectionMode(SingleSelection); setEditTriggers(AllEditTriggers); // maintain order accordingly to ColumnId, ColumnProposalText, etc. setHeaderLabels( QStringList() << tr("Id") << tr("Text") << tr("Solution") ); setRootIsDecorated(false); setWordWrap(true); overlay()->setText( tr("Right click to add new proposal") ); connect(this, SIGNAL(itemSelectionChanged()),this, SLOT(onSelectionChange())); connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(onItemChange(QTreeWidgetItem*,int))); connect(this,SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(onClicked(QTreeWidgetItem*,int))); }
MessagesTreeWidget::MessagesTreeWidget(QWidget *parent) : QTreeWidget(parent) { setColumnCount( 2 ); setHeaderLabels({ "Name", "Error" }); setAlternatingRowColors( true ); }
ProgressTree2::ProgressTree2(QWidget *parent) : QTreeWidget(parent) { this->autoExpandNodes = true; setColumnCount(5); timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(timerTimeout())); timer->start(1000); this->monitoredJobLastChanged = 0; setColumnWidth(0, 500); setColumnWidth(1, 100); setColumnWidth(2, 100); setColumnWidth(3, 200); setColumnWidth(4, 100); header()->setStretchLastSection(false); QStringList hls; hls.append(QObject::tr("Task / Step")); hls.append(QObject::tr("Elapsed time")); hls.append(QObject::tr("Remaining time")); hls.append(QObject::tr("Progress")); hls.append(QObject::tr("")); setHeaderLabels(hls); }
Bookmarks::Bookmarks(QWidget* parent) : QTreeWidget(parent) { setLayoutDirection(Qt::RightToLeft); setTextElideMode(Qt::ElideMiddle); #ifdef Q_OS_WIN setIndentation(10); #endif QStringList labels; labels << tr("Title") << tr("Comments"); #if QT_VERSION < 0x050000 header()->setResizeMode(QHeaderView::Interactive); #else header()->setSectionResizeMode(QHeaderView::Interactive); #endif setHeaderLabels(labels); m_folderIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirClosedIcon), QIcon::Normal, QIcon::Off); m_folderIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirOpenIcon), QIcon::Normal, QIcon::On); m_bookmarkIcon.addPixmap(QPixmap(ICON_PATH + "/bookmark-on.png")); setAlternatingRowColors(true); connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(doubleClicked(QTreeWidgetItem*,int))); }
MethodViewer::MethodViewer(QWidget *parent): QTreeWidget(parent) { setColumnCount(2); setHeaderLabels(QStringList() << tr("Type") << tr("Signature")); setRootIsDecorated(false); connect(&m_invokeTimer, SIGNAL(timeout()), this, SLOT(_invokeTimerTick())); }
DirTreeView::DirTreeView( QWidget * parent ): TreeViewPopupMenu (parent) { //QLocale::setDefault(QLocale::c() ); //FileListWidgetItem *fi = new FileListWidgetItem (this); QStringList headers; headers << tr("dirname"); setHeaderLabels(headers ); //fi->setText(0, QDir::rootPath() ); QFileInfoList file_info_list=QDir::drives(); qDebug("file_info_list.size(): %d", file_info_list.size()); for (int i=0 ; i < file_info_list.size() ; ++i) { FileListWidgetItem *fi = new FileListWidgetItem (this); qDebug("file_info_list.at(i).fileName(): %s", file_info_list.at(i).absoluteFilePath().toAscii().data() ); //absoluteFilePath(); fi->setText(0, file_info_list.at(i).absoluteFilePath() ); fi->set_real_str(file_info_list.at(i).absoluteFilePath() ); #if QT_VERSION >= 0x40200 //setSelected only in qt-4.2.0 if (i==0) { fi->setSelected(true); } #endif } connect(this, SIGNAL(itemDoubleClicked ( QTreeWidgetItem * , int )), this, SLOT(expend_dirs( QTreeWidgetItem * , int ))); #if 0 popup_menu_timer_ = new QTimer(this); popup_menu_timer_->setSingleShot(true); connect( popup_menu_timer_, SIGNAL( timeout() ), SLOT( show_fo_menu() ) ); #endif // don't encoding in QDir, QFile QFile::setDecodingFunction(myDecoderFunc); QFile::setEncodingFunction(myEncoderFunc); // This let QTextCodec use 8859-1 codec for anything // include QDir filename. //QTextCodec::setCodecForLocale(QTextCodec::codecForName("8859-1") ); CREATE_ACTIONS(remove_, "remove", s_rm); ok_dialog_ = new RenameDialog(this); ok_dialog_ -> set_ok_dialog(); #ifdef MAC_ENC cur_enc_=UTF8; utf8_enc_->setChecked(true); #else cur_enc_=BIG5; big5_enc_->setChecked(true); #endif }
LocalsView::LocalsView(QWidget *parent) : QTreeWidget(parent), m_allAdded(true) { QStringList headers; headers << i18n("Symbol"); headers << i18n("Value"); setHeaderLabels(headers); setAutoScroll(false); }
void ArchiveList::setCompactLayout(bool value) { compactLayout = value; /* these values are only hints, the columns will * be resized in updateArchives */ setColumnWidth(0, 150); setColumnWidth(1, 190); if (compactLayout) { setColumnCount(2); setHeaderLabels(QStringList() << tr("Language, Date") << ""); } else { setColumnCount(4); setHeaderLabels(QStringList() << tr("Language, Date") << tr("Size") << "" << tr("Status")); setColumnWidth(2, 140);//fm.width("")); setColumnWidth(3, 100);//fm.width("")); } }
void QcTreeWidget::setColumns( const QVariantList & varList ) { int count = varList.size(); setColumnCount( count ); QStringList labels; Q_FOREACH( const QVariant & var, varList ) labels << var.toString(); setHeaderLabels( labels ); }
PlayListWidget::PlayListWidget(QWidget* parent) : QTreeWidget(parent){ // qDebug() << this << "constructor()"; setRootIsDecorated(false); setSortingEnabled(false); setAcceptDrops(true); setDragEnabled(true); setItemsExpandable(false); setTabKeyNavigation(false); setSelectionMode(QAbstractItemView::ExtendedSelection); setAlternatingRowColors(true); setAllColumnsShowFocus(true); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); header()->setContextMenuPolicy(Qt::CustomContextMenu); connect( header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(headerContextMenu(const QPoint&)) ); QStringList headerLabels; headerLabels << "*" << "Artist" << "Album" << "Title" << "Date" << "Genre"<< "Track No." << "Length"; setHeaderLabels(headerLabels); tabs=(PlayListTabs*) parentWidget(); dropPointer=new DropPointer(this); dropPointer->hide(); dropPointer->setWidth(visibleWidth()); dropPointer->moveTo(0); refreshConfig(); connectConfigUpdate(); connect( this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(doubleClicked(QTreeWidgetItem*,int)) ); connect( this, SIGNAL(playItem(PlayListItem*)), tabs, SLOT(playItem(PlayListItem*)) ); connect( this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(deselect(QTreeWidgetItem*,int)) ); connect( verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(printPos(int)) ); firstShow=true; scrollPosition=0; }
ScanGallery::ScanGallery(QWidget *parent) : FileTreeView(parent) { setObjectName("ScanGallery"); //header()->setStretchEnabled(true,0); // do we like this effect? setColumnCount(3); setRootIsDecorated(false); //setSortingEnabled(true); //sortByColumn(0, Qt::AscendingOrder); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); QStringList labels; labels << i18n("Name"); labels << i18n("Size"); labels << i18n("Format"); setHeaderLabels(labels); headerItem()->setTextAlignment(0, Qt::AlignLeft); headerItem()->setTextAlignment(1, Qt::AlignLeft); headerItem()->setTextAlignment(2, Qt::AlignLeft); // Drag and Drop setDragEnabled(true); // allow drags out model()->setSupportedDragActions(Qt::CopyAction|Qt::MoveAction); setAcceptDrops(true); // allow drops in connect(this, SIGNAL(dropped(QDropEvent *,FileTreeViewItem *)), SLOT(slotUrlsDropped(QDropEvent *,FileTreeViewItem *))); connect(this, SIGNAL(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)), SLOT(slotItemHighlighted(QTreeWidgetItem *))); connect(this, SIGNAL(itemActivated(QTreeWidgetItem *,int)), SLOT(slotItemActivated(QTreeWidgetItem *))); connect(this, SIGNAL(fileRenamed(FileTreeViewItem *,const QString &)), SLOT(slotFileRenamed(FileTreeViewItem *,const QString &))); connect(this, SIGNAL(itemExpanded(QTreeWidgetItem *)), SLOT(slotItemExpanded(QTreeWidgetItem *))); /* Preload frequently used icons */ KIconLoader::global()->addAppDir("libkscan"); // access to library icons mPixFloppy = KIconLoader::global()->loadIcon("media-floppy", KIconLoader::NoGroup, KIconLoader::SizeSmall); mPixGray = KIconLoader::global()->loadIcon("palette-gray", KIconLoader::NoGroup, KIconLoader::SizeSmall); mPixBw = KIconLoader::global()->loadIcon("palette-lineart", KIconLoader::NoGroup, KIconLoader::SizeSmall); mPixColor = KIconLoader::global()->loadIcon("palette-color", KIconLoader::NoGroup, KIconLoader::SizeSmall); m_startup = true; m_currSelectedDir = KUrl(); mSaver = NULL; mSavedTo = NULL; /* create a context menu and set the title */ m_contextMenu = new KMenu(); m_contextMenu->addTitle(i18n("Gallery")); }
void MaskListWidget::refresh() { clear(); setHeaderLabels(QStringList("Masks")); QStringList file_list=QDir(d->m_path+"/attachments").entryList(QStringList("mask*.mda"),QDir::Files,QDir::Name); foreach (QString file,file_list) { QTreeWidgetItem *it=new QTreeWidgetItem; it->setText(0,file); it->setData(0,Qt::UserRole,d->m_path+"/attachments/"+file); addTopLevelItem(it); }
SoundLibraryTree::SoundLibraryTree( QWidget *pParent ) : QTreeWidget( pParent ) { setHeaderLabels( QStringList( trUtf8( "Sound library" ) ) ); setAlternatingRowColors(true); setRootIsDecorated( false ); setItemHidden( headerItem(), true ); // hides the header }
DownloadQueue::DownloadQueue(QWidget * parent) : QTreeWidget(parent) { setHeaderLabels(QStringList() << tr("Status") << tr("Title") << tr("Formats") << tr("Video Format") << tr("Audio Format")); header()->setResizeMode(0, QHeaderView::ResizeToContents); header()->setResizeMode(1, QHeaderView::ResizeToContents); header()->setResizeMode(2, QHeaderView::ResizeToContents); header()->setResizeMode(3, QHeaderView::ResizeToContents); header()->setResizeMode(4, QHeaderView::ResizeToContents); DownloadItemDelegate * delegate = new DownloadItemDelegate(this); setItemDelegate(delegate); }
AttributeWidget::AttributeWidget(FrameCollector* pCollector, QWidget *parent) : QTreeWidget(parent), m_pCollector(pCollector) { QStringList labels; labels << tr("Property") << tr("Value"); header()->setResizeMode(QHeaderView::ResizeToContents); setHeaderLabels(labels); setSelectionMode(SingleSelection); }
SensorHeaderedWidget::SensorHeaderedWidget(SensorView& sensorView, RobotConsole& console) { QStringList headerLabels; headerLabels << "Sensor" << "Value"; setHeaderLabels(headerLabels, "lr"); QHeaderView* headerView = getHeaderView(); headerView->setMinimumSectionSize(50); headerView->resizeSection(0, 80); headerView->resizeSection(1, 50); sensorWidget = new SensorWidget(sensorView, headerView, this); setWidget(sensorWidget); }
EntityTreeWidget::EntityTreeWidget(QWidget * parent) : QTreeWidget(parent), _dragEntity(NULL) { QStringList headerList; headerList << "name" << "type"; setHeaderLabels(headerList); setHeaderHidden (true); hideColumn(1); header()->setResizeMode(0, QHeaderView::Stretch); setMouseTracking(true); setIconSize(QSize(24,24)); }
mtsQtCommandSelector::mtsQtCommandSelector(mtsManagerGlobal* globalComponentManager, QWidget* parent) : QTreeWidget(parent), GlobalManager(globalComponentManager) { setColumnCount(2); QStringList headerLabels; headerLabels << "Name" << "Type"; setHeaderLabels(headerLabels); setSortingEnabled(true); BuildTree(globalComponentManager); connect(this, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(CurrentItemChanged)); connect(this, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this, SLOT(ItemActivated)); }
void NMGMeasureListWidget::addHeaderInformation(Globals::SupportedType type) { if(type == Globals::AGGREGATION) { QStringList header; header << tr("Test"); // 0 header << tr("Name"); // 1 header << tr("Source"); // 2 header << tr("Destination"); // 3 header << tr("Duration"); // 4 header << tr("Throughput\n(sender-receiver)"); // 5 header << tr("Protocol"); // 6 header << tr("SSS"); // 7 header << tr("RSS"); // 8 header << tr("SMS"); // 9 setHeaderLabels(header); hideColumn(1); hideColumn(6); hideColumn(7); hideColumn(8); hideColumn(9); } else if(type == Globals::PACKETS) { // packets QStringList header; header << tr("Test/Flow"); // 0 header << tr("Name"); // 1 header << tr("Source\n(IP/port)"); // 2 header << tr("Destination\n(IP/port)"); // 3 header << tr("Duration"); // 4 header << tr("Packet rate\n(packets/sec)"); // 5 header << tr("Packet size\n(bytes)"); // 6 header << tr("Pattern"); // 7 setHeaderLabels(header); hideColumn(1); hideColumn(7); } }
StatisticRobotHeaderedWidget::StatisticRobotHeaderedWidget(StatisticRobotView& statisticRobotView) { QStringList headerLabels; headerLabels << "Property" << "Value"; setHeaderLabels(headerLabels, "ll"); QHeaderView* headerView = getHeaderView(); headerView->setMinimumSectionSize(70); headerView->resizeSection(0, 130); headerView->resizeSection(1, 70); statisticRobotWidget = new StatisticRobotWidget(statisticRobotView, headerView, this); setWidget(statisticRobotWidget); connect(getHeaderView(), SIGNAL(sectionResized(int, int, int)), statisticRobotWidget, SLOT(forceUpdate())); }
TemplKatalogListView::TemplKatalogListView(QWidget *w) : KatalogListView(w), mShowCalcParts( true ) { QStringList labels; labels << i18n("Template"); labels << i18n("Price"); labels << i18n("Calc. Type"); setHeaderLabels(labels); contextMenu()->addTitle( i18n("Template Catalog")); }
ComputerWidget::ComputerWidget(QWidget* parent/*=0*/):QTreeWidget(parent) { QStringList l; l << tr("Параметр") << tr("Значение"); setHeaderLabels(l); p_comp=NULL; p_compClassName=""; setColumnCount(2); createCaptions(); outputData(); }
dragTarget::dragTarget (dragSource *source, QWidget *parent ) : QTreeWidget ( parent ) { //let's initialize the dropIndicator indicator = new QWidget(viewport()); indicator -> setAutoFillBackground(true); QPalette pale = indicator -> palette(); pale.setColor(QPalette::Base, Qt::blue); indicator -> setPalette(pale); hideIndicator(); //let's initialize some pointers... sourceView = source; scrollUpTimer = new QTimer(); scrollDownTimer = new QTimer(); indicatorToRestore = NULL; //setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); //...and some list settings subLevel = false; setAcceptDrops ( true ); setDragEnabled ( true ); setAutoScroll(true); setDragDropMode ( QAbstractItemView::DragDrop ); setColumnCount ( 4 ); setHeaderLabels ( QStringList() <<tr ( "Item" ) <<tr ( "Path" ) <<tr ( "MimeType" ) <<tr ( "Size" ) ); header() -> moveSection ( 3,1 ); setColumnWidth ( 0,170 ); setDropIndicatorShown ( true ); //setAnimated ( true ); newFolder = new QAction ( tr ( "New Folder" ), this ); newFolder -> setIcon ( KIcon ( "folder-new" ) ); //newFolder -> setShortcut(QKeySequence(tr("Ctrl+A"))); //this -> addAction(newFolder); delItem = new QAction ( tr ( "Delete Item" ), this ); delItem -> setIcon ( KIcon ( "edit-delete" ) ); //delItem -> setShortcut(QKeySequence(tr("Del"))); //TODO check! //this -> addAction(delItem); //this-> setContextMenuPolicy(Qt::DefaultContextMenu); //se non imposto defaultcontextmenu non posso reimplementare la gestione del contextmenu //creo il menu menu = new QMenu ( tr ( "Options" ),this ); menu -> addAction ( newFolder ); menu -> addAction ( delItem ); connect ( newFolder, SIGNAL ( triggered() ), this, SLOT ( createNewFolder() ) ); connect ( delItem, SIGNAL ( triggered() ), this, SLOT ( deleteItem() ) ); delItem -> setEnabled ( false ); setItemsExpandable ( true ); setSelectionMode(QAbstractItemView::ExtendedSelection); //setSelectionMode(QAbstractItemView::ExtendedSelection); //inizialmente viene gestita solo la selezione singola }
GpxTreeWidget::GpxTreeWidget(GpxFile *gpx) : _gpx(gpx) { // _gpxTree = new QTreeWidget; QStringList columns = QStringList() << tr("Track #") << tr("Name") << tr("Length\n(miles)") << tr("# Pts") << tr("Duration") << tr("Max Speed\n(mph)") << tr("Avg. Speed\n(mph)"); setColumnCount(columns.size()); setHeaderLabels(columns); for (int i=0; i<6; ++i) { header()->setResizeMode(i, QHeaderView::Stretch); } setSelectionMode(QAbstractItemView::ExtendedSelection); mergeAction = new QAction(this); mergeAction->setText(tr("Merge")); mergeAction->setToolTip(tr("Merge the selected tracks into one.")); mergeAction->setDisabled(true); removeAction = new QAction(this); removeAction->setText(tr("Remove")); removeAction->setToolTip(tr("Remove the selected tracks.")); removeAction->setDisabled(true); splitAction = new QAction(this); splitAction->setText(tr("Split")); splitAction->setToolTip(tr("Split selected track into seperate file.")); splitAction->setDisabled(true); multiContextMenu = new QMenu(tr("Multi-selection Track Menu")); multiContextMenu->addAction(mergeAction); multiContextMenu->addAction(removeAction); singleContextMenu = new QMenu(tr("Single selection Track Menu")); singleContextMenu->addAction(splitAction); singleContextMenu->addAction(removeAction); connect(mergeAction, SIGNAL(triggered()), this, SLOT(mergeTracks())); connect(removeAction, SIGNAL(triggered()), this, SLOT(removeTracks())); connect(splitAction, SIGNAL(triggered()), this, SLOT(splitTrack())); if (_gpx) { buildTree(); } }
QCSTreeWidget::QCSTreeWidget(ContinuousStructure* CS, QWidget * parent) : QTreeWidget(parent) { clCS=CS; setColumnCount(2); setColumnWidth(0,200); // setColumnWidth(1,16); setHeaderLabels(QStringList(tr("Properties / Primitives"))<<tr("Vis")); // setItemHidden(headerItem(),true); // qTree->setDragEnabled(true); // qTree->setAcceptDrops(true); // qTree->setDropIndicatorShown(true); QObject::connect(this,SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this,SLOT(Edit(QTreeWidgetItem*,int))); QObject::connect(this,SIGNAL(itemClicked(QTreeWidgetItem*,int)),this,SLOT(Clicked(QTreeWidgetItem*,int))); }
ThreadList::ThreadList(QWidget* parent) : QTreeWidget(parent) { setHeaderLabels(QStringList() << i18n("Thread ID") << i18n("Location")); header()->setResizeMode(1, QHeaderView::Interactive); setRootIsDecorated(false); // load pixmaps m_focusIcon = UserIcon("pcinner"); makeNoFocusIcon(); connect(this, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(slotCurrentChanged(QTreeWidgetItem*))); }