void handleInterrupt21(int ax, int bx, int cx, int dx){ int cur; switch(ax){ case 0x0: /*Print String*/ printString(bx); break; case 0x1: /*Read String*/ readString(bx); break; case 0x2: /*Read Sector*/ readSector(bx, cx); break; case 0x3: /*Read File*/ readFile(bx, cx); break; case 0x4: /*Execute Program*/ executeProgram(bx, NOONE); break; case 0x5: /*Terminate Program*/ terminate(); break; case 0x6: /*Write Sector*/ writeSector(bx, cx); break; case 0x7: /*Delete File*/ deleteFile(bx); break; case 0x8: /*Write File*/ writeFile(bx, cx, dx); break; case 0x9: /*Kill Process*/ killProcess(bx); break; case 0xa: /*Execute Program in Blocking Fashion*/ setKernelDataSegment(); cur = currentProcess; restoreDataSegment(); executeProgram(bx, cur); break; case 0xb: listProcesses(); break; case 0xc: editString(bx); break; default: printString("Interrupt21 got undefined ax."); break; } return; }
StringListEdit::StringListEdit(const QStringList &list, UntitledList* unamedList, QWidget *parent) : QDialog(parent), ask(false), duplicatesOk(false), _suggestedStringsList(unamedList) { addCaption = "Add String"; addLabel = "String:"; editCaption = "Edit String"; editLabel = addLabel; Q3HBoxLayout *hbox = new Q3HBoxLayout(this, 5, 5); Q3VBoxLayout *vbox = new Q3VBoxLayout; listBox = new Q3ListBox(this); connect(listBox, SIGNAL(currentChanged(Q3ListBoxItem*)), this, SLOT(updateButtons())); hbox->addWidget(listBox, 1); QPushButton *button = new QPushButton(tr("&Add..."), this); connect(button, SIGNAL(clicked()), this, SLOT(addString())); vbox->addWidget(button); editButton = new QPushButton(tr("&Edit..."), this); connect(editButton, SIGNAL(clicked()), this, SLOT(editString())); vbox->addWidget(editButton); removeButton = new QPushButton(tr("&Remove..."), this); connect(removeButton, SIGNAL(clicked()), this, SLOT(removeString())); vbox->addWidget(removeButton); upButton = new QPushButton(tr("&Up"), this); connect(upButton, SIGNAL(clicked()), this, SLOT(moveUp())); vbox->addWidget(upButton); downButton = new QPushButton(tr("&Down"), this); connect(downButton, SIGNAL(clicked()), this, SLOT(moveDown())); vbox->addWidget(downButton); vbox->addStretch(1); button = new QPushButton(tr("OK"), this); connect(button, SIGNAL(clicked()), this, SLOT(accept())); vbox->addWidget(button); button = new QPushButton(tr("Cancel"), this); connect(button, SIGNAL(clicked()), this, SLOT(reject())); vbox->addWidget(button); hbox->addLayout(vbox); setList(list); }
StringSelector::StringSelector(QWidget *parent, ObjectStore *store) : QWidget(parent), _allowEmptySelection(false), _store(store) { setupUi(this); int size = style()->pixelMetric(QStyle::PM_SmallIconSize); _newString->setIcon(KstGetIcon("kst_stringnew")); _editString->setIcon(KstGetIcon("kst_stringedit")); _newString->setFixedSize(size + 8, size + 8); _editString->setFixedSize(size + 8, size + 8); _selectString->setFixedSize(size + 8, size + 8); fillStrings(); connect(_newString, SIGNAL(pressed()), this, SLOT(newString())); connect(_editString, SIGNAL(pressed()), this, SLOT(editString())); connect(_string, SIGNAL(currentIndexChanged(int)), this, SLOT(emitSelectionChanged())); connect(_string, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDescriptionTip())); }