CpuTabPage::CpuTabPage(wxWindow* parent, DebugInterface* _cpu) : wxPanel(parent), cpu(_cpu) { wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); SetSizer(mainSizer); leftTabs = new wxNotebook(this,wxID_ANY); bottomTabs = new wxNotebook(this,wxID_ANY); disassembly = new CtrlDisassemblyView(this,cpu); registerList = new CtrlRegisterList(leftTabs,cpu); functionList = new wxListBox(leftTabs,wxID_ANY,wxDefaultPosition,wxDefaultSize,0,NULL,wxBORDER_NONE|wxLB_SORT); memory = new CtrlMemView(bottomTabs,cpu); // create register list and disassembly section wxBoxSizer* middleSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* miscStuffSizer = new wxBoxSizer(wxHORIZONTAL); cyclesText = new wxStaticText(this,wxID_ANY,L""); miscStuffSizer->Add(cyclesText,0,wxLEFT|wxTOP|wxBOTTOM,2); leftTabs->AddPage(registerList,L"Registers"); leftTabs->AddPage(functionList,L"Functions"); wxBoxSizer* registerSizer = new wxBoxSizer(wxVERTICAL); registerSizer->Add(miscStuffSizer,0); registerSizer->Add(leftTabs,1); middleSizer->Add(registerSizer,0,wxEXPAND|wxRIGHT,2); middleSizer->Add(disassembly,2,wxEXPAND); mainSizer->Add(middleSizer,3,wxEXPAND|wxBOTTOM,3); // create bottom section bottomTabs->AddPage(memory,L"Memory"); breakpointList = new BreakpointList(bottomTabs,cpu,disassembly); bottomTabs->AddPage(breakpointList,L"Breakpoints"); threadList = NULL; stackFrames = NULL; if (cpu == &r5900Debug) { threadList = new ThreadList(bottomTabs,cpu); bottomTabs->AddPage(threadList,L"Threads"); stackFrames = new StackFramesList(bottomTabs,cpu,disassembly); bottomTabs->AddPage(stackFrames,L"Stack frames"); } mainSizer->Add(bottomTabs,1,wxEXPAND); mainSizer->Layout(); lastCycles = 0; loadCycles(); }
NumberCycleDialog::NumberCycleDialog( QWidget *parent, const QString& initType ) :QDialog( parent ) // "NUMBER_CYCLES_EDIT", true, i18n( "Edit Number Cycles" ), Ok|Cancel ) { setObjectName( "NUMBER_CYCLES_EDIT" ); setModal( true ); setWindowTitle( i18n( "Edit Number Cycles" ) ); QVBoxLayout *layout = new QVBoxLayout; setLayout(layout); QWidget *w = new QWidget; layout->addWidget(w); mBaseWidget = new Ui::NumberCycleEditBase( ); mBaseWidget->setupUi( w ); mBaseWidget->mPbAdd->setIcon( QIcon::fromTheme( "list-add" ) ); mBaseWidget->mPbRemove->setIcon( QIcon::fromTheme( "list-remove" ) ); mBaseWidget->mCounterEdit->setMaximum( 1000000 ); mBaseWidget->mCounterEdit->setSingleStep( 1 ); const QString tip = i18n( "The template may contain the following tags:" "<ul><li>%y or %yyyy - the year of the documents date.</li>" "<li>%yy - the year of the document (two digits).</li>" "<li>%w - the week number of the documents date.</li>" "<li>%ww - the week number of the documents date with leading zero.</li>" "<li>%d - the day number of the documents date.</li>" "<li>%dd - the day number of the documents date with leading zero.</li>" "<li>%m or %M - the month number of the documents date.</li>" "<li>%MM - the month number with leading zero.</li>" "<li>%c - the customer id from kaddressbook</li>" "<li>%i - the unique counter</li>" "<li>%type - the localised doc type (offer, invoice etc.)</li>" "<li>%uid - the contact id of the client.</li>" "</ul>%i needs to be part of the template." ); mBaseWidget->mIdTemplEdit->setToolTip( tip ); connect( mBaseWidget->mPbAdd, SIGNAL( clicked() ), SLOT( slotAddCycle() ) ); connect( mBaseWidget->mPbRemove, SIGNAL( clicked() ), SLOT( slotRemoveCycle() ) ); loadCycles(); connect( mBaseWidget->mCycleListBox, SIGNAL( currentRowChanged( int ) ), SLOT( slotNumberCycleSelected( int ) ) ); QListWidgetItem *initItem = mBaseWidget->mCycleListBox->findItems( initType, Qt::MatchExactly ).first(); if ( initItem ) { mBaseWidget->mCycleListBox->setCurrentItem( initItem, QItemSelectionModel::Select ); } QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel); _okButton = buttonBox->button(QDialogButtonBox::Ok); _okButton->setDefault(true); _okButton->setShortcut(Qt::CTRL | Qt::Key_Return); connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); layout->addWidget(buttonBox); slotUpdateExample(); connect( mBaseWidget->mIdTemplEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotTemplTextChanged( const QString& ) ) ); connect( mBaseWidget->mCounterEdit, SIGNAL( valueChanged( int ) ), SLOT( slotUpdateExample() ) ); }