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&))); }
QtChatListWindow::QtChatListWindow(UIEventStream *uiEventStream, SettingsProvider* settings, QWidget* parent) : QTreeView(parent) { eventStream_ = uiEventStream; settings_ = settings;; bookmarksEnabled_ = false; model_ = new ChatListModel(); setModel(model_); delegate_ = new ChatListDelegate(settings_->getSetting(QtUISettingConstants::COMPACT_ROSTER)); 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&))); settings_->onSettingChanged.connect(boost::bind(&QtChatListWindow::handleSettingChanged, this, _1)); }
//----------------------- ViewListWidget::ViewListWidget( MainDocument *part, QWidget *parent )//QString name, KXmlGuiWindow *parent ) : QWidget( parent ), m_part( part ), m_prev( 0 ), m_temp( 0 ) { setObjectName("ViewListWidget"); m_viewlist = new ViewListTreeWidget( this ); m_viewlist->setEditTriggers( QAbstractItemView::NoEditTriggers ); connect(m_viewlist, SIGNAL(modified()), this, SIGNAL(modified())); m_currentSchedule = new KComboBox( this ); m_model.setFlat( true ); m_sfModel.setFilterKeyColumn ( ScheduleModel::ScheduleScheduled ); m_sfModel.setFilterRole( Qt::EditRole ); m_sfModel.setFilterFixedString( "true" ); m_sfModel.setDynamicSortFilter ( true ); m_sfModel.setSourceModel( &m_model ); m_currentSchedule->setModel( &m_sfModel ); QVBoxLayout *l = new QVBoxLayout( this ); l->setMargin( 0 ); l->addWidget( m_viewlist ); l->addWidget( m_currentSchedule ); connect( m_viewlist, SIGNAL( currentItemChanged( QTreeWidgetItem*, QTreeWidgetItem* ) ), SLOT( slotActivated( QTreeWidgetItem*, QTreeWidgetItem* ) ) ); connect( m_viewlist, SIGNAL( itemChanged( QTreeWidgetItem*, int ) ), SLOT( slotItemChanged( QTreeWidgetItem*, int ) ) ); setupContextMenus(); connect( m_currentSchedule, SIGNAL( activated( int ) ), SLOT( slotCurrentScheduleChanged( int ) ) ); connect( &m_model, SIGNAL( scheduleManagerAdded( ScheduleManager* ) ), SLOT( slotScheduleManagerAdded( ScheduleManager* ) ) ); connect( m_viewlist, SIGNAL( updateViewInfo( ViewListItem* ) ), SIGNAL( updateViewInfo( ViewListItem* ) ) ); }
radeon_profile::radeon_profile(QStringList a,QWidget *parent) : QMainWindow(parent), ui(new Ui::radeon_profile) { ui->setupUi(this); timer = new QTimer(this); execsRunning = new QList<execBin*>(); // checks if running as root if (globalStuff::grabSystemInfo("whoami")[0] == "root") { globalStuff::globalConfig.rootMode = true; ui->label_rootWarrning->setVisible(true); } else { globalStuff::globalConfig.rootMode = false; ui->label_rootWarrning->setVisible(false); } // setup ui elemensts ui->mainTabs->setCurrentIndex(0); ui->tabs_systemInfo->setCurrentIndex(0); ui->configGroups->setCurrentIndex(0); ui->list_currentGPUData->setHeaderHidden(false); ui->execPages->setCurrentIndex(0); setupGraphs(); setupForcePowerLevelMenu(); setupOptionsMenu(); setupContextMenus(); setupTrayIcon(); loadConfig(); //figure out parameters QString params = a.join(" "); if (params.contains("--driver xorg")) { device.driverByParam(gpu::XORG); ui->combo_gpus->addItems(device.initialize(true)); } else if (params.contains("--driver fglrx")) { device.driverByParam(gpu::FGLRX); ui->combo_gpus->addItems(device.initialize(true)); } else // driver object detects cards in pc and fill the list in ui // ui->combo_gpus->addItems(device.initialize()); ui->configGroups->setTabEnabled(2,device.daemonConnected()); setupUiEnabledFeatures(device.features); if(ui->cb_enableOverclock->isChecked() && ui->cb_overclockAtLaunch->isChecked()) ui->btn_applyOverclock->click(); connectSignals(); // timer init timer->setInterval(ui->spin_timerInterval->value()*1000); // fill tables with data at the start // refreshGpuData(); ui->list_glxinfo->addItems(device.getGLXInfo(ui->combo_gpus->currentText())); ui->list_connectors->addTopLevelItems(device.getCardConnectors()); ui->list_connectors->expandToDepth(2); ui->list_modInfo->addTopLevelItems(device.getModuleInfo()); refreshUI(); timer->start(); addRuntimeWidgets(); showWindow(); }