void CombatWindow::initUI() { #ifdef DEBUGCOMBAT printf("CombatWindow::initUI: starting...\n"); #endif QVBoxLayout* layout = new QVBoxLayout(this); layout->setAutoAdd(true); m_tab = new QTabWidget(this); m_widget_offense = initOffenseWidget(); m_tab->addTab(m_widget_offense, "&Offense"); m_widget_defense = initDefenseWidget(); m_tab->addTab(m_widget_defense, "&Defense"); m_widget_mob = initMobWidget(); m_tab->addTab(m_widget_mob, "&Mobs"); updateOffense(); updateDefense(); updateMob(); #ifdef DEBUGCOMBAT printf("CombatWindow::initUI: finished...\n"); #endif }
void CombatWindow::initUI() { #ifdef DEBUGCOMBAT seqDebug("CombatWindow::initUI: starting..."); #endif m_tab = new QTabWidget(); m_offenseTab = initOffenseWidget(); m_tab->addTab(m_offenseTab, "&Offense"); m_defenseTab = initDefenseWidget(); m_tab->addTab(m_defenseTab, "&Defense"); m_mobTab = initMobWidget(); m_tab->addTab(m_mobTab, "&Mobs"); //m_menuBar = new QMenuBar(this); //m_clearMenu = new Q3PopupMenu(this); //m_clearMenu->insertItem("Clear Offense Stats", this, SLOT(clearOffense())); //m_clearMenu->insertItem("Clear Mob Stats", this, SLOT(clearMob())); //m_menuBar->insertItem("&Clear", m_clearMenu); //QPushButton* m_clearButton = new QPushButton("Clear"); //connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clearOffense())); //connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clearMob())); //QVBoxLayout* mainLayout = new QVBoxLayout(); //mainLayout->addWidget(m_tab); //mainLayout->addWidget(m_clearButton); updateOffense(); updateDefense(); updateMob(); //QWidget* layoutWidget = new QWidget(); //layoutWidget->setLayout(mainLayout); //setWidget(layoutWidget); setWidget(m_tab); #ifdef DEBUGCOMBAT seqDebug("CombatWindow::initUI: finished..."); #endif }
void CombatWindow::initUI() { #ifdef DEBUGCOMBAT seqDebug("CombatWindow::initUI: starting..."); #endif QVBoxLayout* layout = new QVBoxLayout(boxLayout()); m_menu_bar = new QMenuBar(this); layout->addWidget(m_menu_bar); m_tab = new QTabWidget(this); layout->addWidget(m_tab); m_widget_offense = initOffenseWidget(); m_tab->addTab(m_widget_offense, "&Offense"); m_widget_defense = initDefenseWidget(); m_tab->addTab(m_widget_defense, "&Defense"); m_widget_mob = initMobWidget(); m_tab->addTab(m_widget_mob, "&Mobs"); m_clear_menu = new QPopupMenu(this); m_clear_menu->insertItem("Clear Offense Stats", this, SLOT(clearOffense())); m_clear_menu->insertItem("Clear Mob Stats", this, SLOT(clearMob())); m_menu_bar->insertItem("&Clear", m_clear_menu); updateOffense(); updateDefense(); updateMob(); #ifdef DEBUGCOMBAT seqDebug("CombatWindow::initUI: finished..."); #endif }