//datei-name: main.C
#include "baum.moc"
Baum* baum;
KApplication* app;
BMes* bMes;
Fund* fundList;
Dump* dump;
InputDialog* eDialog;
EditDialog* editDialog;
Output* outputWindow;
char pfad[512];
int main(int argc, char** argv)
{ strcpy(pfad, argv[0]);
pfad[strlen(pfad)- 4] = 0;
app = new KApplication(argc, argv, "baum");
baum = new Baum();
fundList = new Fund(baum); //1
dump = new Dump(baum);
eDialog = new InputDialog(baum);
editDialog = new EditDialog(baum);
app->setMainWidget(baum);
baum->topMenu(); baum->qConnect(); baum->show();
if (argc == 2)
{ strcpy(baum->edbox, argv[1]); //3
baum->cmdline(); argc = 1; } //4
return app->exec(); } //5
//1 init dialog
//2 Übergabeparameter holen
//3 cmdline siehe baum.C
//4 haupt·schleife (paintEvent|keyPressEvent|mousePressEvent)
Baum::Baum()
{ initCons(); initVar(); initBaum(); initDesktop(); }
void Baum::initCons()
{ CR = 13; LF = 10; //1
STDLOC = 0; EDLOC = 1; RUNLOC = 2; CPYLOC = 3; TOKLOC = 4; OUTLOC = -1;
ENDC = 300000; ENDW = 100000; ENDS = 200000; ENDRL = 400000; LZAHL = 50;
MAGIC = 0x87654321; BDAT = 5000000; SHFT = 8; CNTRL = 16; ALTER = 32;
STACK = 1250000; STCK1 = 250000; CSTACK = 250000; CSTCK1 = 6200; STCK = 500; CSTCK = 500;
GSTACK = 500000; RUN = 40000; REK = 20000, CALC = 1000; SLOTS = 200; FIFO = 1000;
LH = 20; TLX = 100; TRX = 500; LGX = 92; RGX = 492;
BILDM = 400; BILDBR = 800; BOXX = 328; LBOXX = 122; RBOXX = 534; BOXY = 545; BOXH = 20;
BBR = 38; BOXBR = 144; RZX = 737;
LY2 = 535; CLPY = 608; CLPH = 40; EDY = 647; BILDH = 703; }
//1 LF reicht
void Baum::initVar()
{ int i;
mes3Flag = 0; freeFlag = 1;
wort0 = 255; satz0 = 1; rzl0 = 1; clipA = 2;
loc = STDLOC; nr = 0; sMax = 1; rMax = 1; inp = 0; sortZ = 0;
flag = mesFlag = bmod = shadowflag = shadowRoot = dbgFlag = rpFlag = edFlag = 0;
lflag = lcmod = 1; iM = 0;
slotNr = 0; fifoNr = 0; fifoTop = 0; signalCode = 0; signalSemaphor = 0; signalWorks = 0;
edbox[0] = 0; vbox[0] = 0; box[0] = 0;
lcbox[0] = 0; rzbox[0] = 0;
root = 0; rTyp = 'w';
gStack = NULL;
for(i = 0; i < 8; i++)
{ clipTyp[i] = 0;
clapTyp[i] = 0;
clip[i] = 0;
clap[i] = 0; }
for(i = 0; i < 16; i++)
{ comboTyp[i] = 0;
combo[i] = 0; }
for(i = 0; i < LZAHL; i++)
{ btextl[i][0] = 0;
btextr[i][0] = 0; } }
void Baum::initBaum()
{ ascii = new char[ENDC+1]; w = new wort[ENDW+1];
s = new satz[ENDS+1]; r = new kett[ENDRL+1];
r[0].zS = 0; r[0].zz = 0;
tabl = new tab_t[LZAHL]; tabr = new tab_t[LZAHL];
stack = new int[STACK]; cstack = new char[CSTACK];
tmpF = new tmp_t[1000];
slotList = new int[SLOTS];
fifo = new int[FIFO];
stckrset(); asciinit(); keyList(); funcInit();
lastInput(0); }
void Baum::stckrset()
{ stck0 = stack; cstck0 = cstack;
stck1 = stack + STCK1; cstck1 = cstack + CSTCK1;
stck2 = stack + 2 * STCK1; cstck2 = cstack + 2 * CSTCK1;
stck3 = stack + 3 * STCK1; cstck3 = cstack + 3 * CSTCK1;
stck4 = stack + 4 * STCK1; cstck4 = cstack + 4 * CSTCK1; }
void Baum::asciinit ()
{ int c = 0;
asci0 = ascii;
while (c < 256)
{ w[c].st = asci0;
*asci0++ = char(c);
*asci0++ = 0;
++c; } }
void Baum::keyList()
{ auto_ = wortI("auto");
break_ = wortI("break");
case_ = wortI("case");
char_ = wortI("char");
const_ = wortI("const");
continue_ = wortI("continue");
default_ = wortI("default");
do_ = wortI("do");
double_ = wortI("double");
else_ = wortI("else");
enum_ = wortI("enum");
extern_ = wortI("extern");
float_ = wortI("float");
for_ = wortI("for");
goto_ = wortI("goto");
if_ = wortI("if");
int_ = wortI("int");
long_ = wortI("long");
register_ = wortI("register");
return_ = wortI("return");
short_ = wortI("short");
signed_ = wortI("signed");
sizeof_ = wortI("sizeof");
slot_ = wortI("slot");
static_ = wortI("static");
struct_ = wortI("struct");
switch_ = wortI("switch");
typedef_ = wortI("typedef");
union_ = wortI("union");
unsigned_ = wortI("unsigned");
void_ = wortI("void");
volatile_ = wortI("volatile");
while_ = wortI("while");
//
asm_ = wortI("asm");
catch_ = wortI("catch");
class_ = wortI("class");
delete_ = wortI("delete");
friend_ = wortI("friend");
inline_ = wortI("inline");
new_ = wortI("new");
operator_ = wortI("operator");
private_ = wortI("private");
protected_= wortI("protected");
public_ = wortI("public");
template_ = wortI("template");
throw_= wortI("throw");
try_ = wortI("try");
uchar_ = wortI("uchar");
uint_ = wortI("uint");
ulong_ = wortI("ulong");
virtual_ = wortI("virtual");
cin_ = wortI("cin");
cout_ = wortI("cout");
pp_ = wortI("++");
mm_ = wortI("--");
k1_ = wortI("()");
k2_ = wortI("[]");
//
Baum_ = wortI("Baum");
FILE_ = wortI("FILE");
BMes_ = wortI("BMes");
KApp_ = wortI("KApplication");
QKeyEv_ = wortI("QKeyEvent");
QMouseEv_ = wortI("QMouseEvent");
QLineEd_ = wortI("QLineEdit");
QPaintEv_ = wortI("QPaintEvent");
QPaint_ = wortI("QPainter");
QResizeEv_ = wortI("QResizeEvent");
endl_ = wortI("endl");
if_then = wortI("if then");
while_do = wortI("while do");
do_while = wortI("do while");
for_do = wortI("for do");
then_ = wortI("then");
//
atom_ = wortI("atom");
knot_ = wortI("knot");
back_ = wortI("back");
st_ = wortI("st");
wl_ = wortI("wl");
wr_ = wortI("wr");
b_ = wortI("b");
sl_ = wortI("sl");
sr_ = wortI("sr");
t1_ = wortI("t1");
t2_ = wortI("t2");
h_ = wortI("h");
s_ = wortI("s");
lc_ = wortI("lc");
zS_ = wortI("zS");
zz_ = wortI("zz");
lab_ = wortI("lab");
fct_ = wortI("fct");
first_ = wortI("first");
cmdStart_ = wortI("cmdStart"); //1
wortI_ = wortI("wortI");
sBau_ = wortI("sBau");
umbauL_ = wortI("umbauL");
umbauR_ = wortI("umbauR");
anbauLl_ = wortI("anbauLl");
anbauLr_ = wortI("anbauLr");
anbauRl_ = wortI("anbauRl");
anbauRr_ = wortI("anbauRr");
abbauLl_ = wortI("abbauLl");
abbauLr_ = wortI("abbauLr");
abbauRl_ = wortI("abbauRl");
abbauRr_ = wortI("abbauRr");
getLKnot_ = wortI("getLKnot");
setLabel_ = wortI("setLabel");
getLoc_ = wortI("getLoc");
setLoc_ = wortI("setLoc");
getRoot_ = wortI("getRoot");
setRoot_ = wortI("setRoot");
getRTyp_ = wortI("getRTyp");
setV_ = wortI("setV");
signal_ = wortI("signal");
getSignal_ = wortI("getSignal");
signalSuccess_ = wortI("signalSuccess");
addSlot_ = wortI("addSlot");
delSlot_ = wortI("delSlot");
repaint_ = wortI("repaint");
val_ = wortI("val");
str_ = wortI("str");
strcat_ = wortI("strcat");
strcmp_ = wortI("strcmp");
strcpy_ = wortI("strcpy");
strlen_ = wortI("strlen");
getClip_ = wortI("getClip");
getClipTyp_ = wortI("getClipTyp");
setClip_ = wortI("setClip");
clear_ = wortI("clear");
sin_ = wortI("sin");
cos_ = wortI("cos");
tan_ = wortI("tan");
asin_ = wortI("asin");
acos_ = wortI("acos");
atan_ = wortI("atan");
sinh_ = wortI("sinh");
cosh_ = wortI("cosh");
tanh_ = wortI("tanh");
ln_ = wortI("ln");
log_ = wortI("log");
exp_ = wortI("exp");
sqrt_ = wortI("sqrt");
abs_ = wortI("abs");
pi_ = wortI("pi");
vartyp_ = wortI("vartyp");
tlz_ = wortI("tlz");
getBVar_ = wortI("getBVar");
setBVar_ = wortI("setBVar");
openWindow_ = wortI("openWindow");
closeWindow_ = wortI("closeWindow");
clearWindow_ = wortI("clearWindow");
resizeWindow_ = wortI("resizeWindow");
drawLine_ = wortI("drawLine");
setBrush_ = wortI("setBrush");
setPen_ = wortI("setPen");
drawRect_ = wortI("drawRect");
drawText_ = wortI("drawText");
drawEllipse_ = wortI("drawEllipse");
setFont_ = wortI("setFont");
savePicture_ = wortI("savePicture");
loadPicture_ = wortI("loadPicture");
setCaption_ = wortI("setCaption");
print_ = wortI("print");
input_ = wortI("input");
strstr_ = wortI("strstr");
time_ = wortI("time");
valf_ = wortI("valf");
srand_ = wortI("srand");
rand_ = wortI("rand");
and_ = wortI("and");
or_ = wortI("or");
xor_ = wortI("xor");
cpl_ = wortI("cpl");
shl_ = wortI("shl");
shr_ = wortI("shr");
isDay_ = wortI("isDay");
copyBaum_= wortI("copyBaum");
clearLOC_ = wortI("clearLOC");
save_ = wortI("save");
load_ = wortI("load");
fTell_ = wortI("fTell");
swap_ = wortI("swap");
tScan_ = wortI("tScan");
remove_ = wortI("remove");
cmdEnd_ = wortI("cmdEnd"); } //2
//1 start of baum functions
//2 end of baum functions
// !! ändere die reihenfolge der befehle nicht (wegen funktionszeiger index), immer nur vor cmdEnd_ einfügen !!
void Baum::funcInit()
{ func[0] = &Baum::f0; //wortI
func[1] = &Baum::f1; //sBau
func[2] = &Baum::f2; //umbau
func[3] = &Baum::f3; //umbau
func[4] = &Baum::f4; //anbauLl
func[5] = &Baum::f5; //anbauLr
func[6] = &Baum::f6; //anbauRl
func[7] = &Baum::f7; //anbauRr
func[8] = &Baum::f8; //abbauLl
func[9] = &Baum::f9; //abbauLr
func[10] = &Baum::f10; //abbauRl
func[11] = &Baum::f11; //abbauRr
func[12] = &Baum::f12; //getLabel
func[13] = &Baum::f13; //setLabel
func[14] = &Baum::f14; //getLoc
func[15] = &Baum::f15; //setLoc
func[16] = &Baum::f16; //getRoot
func[17] = &Baum::f17; //setRoot
func[18] = &Baum::f18; //getRTyp
func[19] = &Baum::f19; //setV
func[20] = &Baum::f20; //signal
func[21] = &Baum::f21; //getSignal
func[22] = &Baum::f22; //signalSuccess
func[23] = &Baum::f23; //addSlot
func[24] = &Baum::f24; //delSlot
func[25] = &Baum::f25; //repaint
func[26] = &Baum::f26; //val
func[27] = &Baum::f27; //str
func[28] = &Baum::f28; //strcat
func[29] = &Baum::f29; //strcmp
func[30] = &Baum::f30; //strcpy
func[31] = &Baum::f31; //strlen
func[32] = &Baum::f32; //getClip
func[33] = &Baum::f33; //getClipTyp
func[34] = &Baum::f34; //setClip
func[35] = &Baum::f35; //clear
func[36] = &Baum::f36; //sin
func[37] = &Baum::f37; //cos
func[38] = &Baum::f38; //tan
func[39] = &Baum::f39; //asin
func[40] = &Baum::f40; //acos
func[41] = &Baum::f41; //atan
func[42] = &Baum::f42; //sinh
func[43] = &Baum::f43; //cosh
func[44] = &Baum::f44; //tanh
func[45] = &Baum::f45; //ln base e
func[46] = &Baum::f46; //log base 10
func[47] = &Baum::f47; //exp
func[48] = &Baum::f48; //sqrt
func[49] = &Baum::f49; //abs
func[50] = &Baum::f50; //pi
func[51] = &Baum::f51; //vartyp
func[52] = &Baum::f52; //tlz
func[53] = &Baum::f53; //getBVar
func[54] = &Baum::f54; //setBVar
func[55] = &Baum::f55; //openWindow
func[56] = &Baum::f56; //closeWindow
func[57] = &Baum::f57; //clearWindow
func[58] = &Baum::f58; //resizeWindow
func[59] = &Baum::f59; //drawLine
func[60] = &Baum::f60; //setBrush
func[61] = &Baum::f61; //setPen
func[62] = &Baum::f62; //drawRect
func[63] = &Baum::f63; //drawText
func[64] = &Baum::f64; //drawEllipse
func[65] = &Baum::f65; //setFont
func[66] = &Baum::f66; //savePicture
func[67] = &Baum::f67; //loadPicture
func[68] = &Baum::f68; //setCaption
func[69] = &Baum::f69; //print
func[70] = &Baum::f70; //input
func[71] = &Baum::f71; //strstr
func[72] = &Baum::f72; //time
func[73] = &Baum::f73; //valf
func[74] = &Baum::f74; //srand
func[75] = &Baum::f75; //rand
func[76] = &Baum::f76; //binary and
func[77] = &Baum::f77; //binary or
func[78] = &Baum::f78; //binary xor
func[79] = &Baum::f79; //complement (invers)
func[80] = &Baum::f80; //shl
func[81] = &Baum::f81; //shr
func[82] = &Baum::f82; //isDay
func[83] = &Baum::f83; //copyBaum
func[84] = &Baum::f84; //clearLOC
func[85] = &Baum::f85; //save
func[86] = &Baum::f86; //load
func[87] = &Baum::f87; //fTell
func[88] = &Baum::f88; //swap
func[89] = &Baum::f89; //tScan
func[90] = &Baum::f90; //remove (F6)
}// baumfunktionen, direkt einsprung über funktionszeiger
// siehe binop.C
void Baum::lastInput(char wflag)
{ strcpy(tex, edbox); stckrset(); tScan(tex); return;
char filename[255];
strcpy(tex, edbox);
strcpy(filename, pfad); strcat(filename, "last_input");
if (wflag)
{ stream = fopen(filename, "at"); //1
if (stream)
{ fputs(edbox, stream); fputs("\n", stream);
fclose(stream);
comboLBox->insertItem((QString) edbox, 0);
if (comboLBox->count() == 17) comboLBox->removeItem(16);
stckrset(); tScan(tex); } }
else
{ stream = fopen(filename, "wt"); //2
fclose(stream); } }
//1 eingabezeile anhängen
//2 neue leere datei erzeugen
void Baum::initDesktop()
{ setGeometry(170, 40, BILDBR, BILDH);
setBackgroundMode(NoBackground);
setFont(QFont("courier", 12, QFont::Bold));
setCaption("baum");
menu = new KMenuBar(this);
statusbar = new QStatusBar(this, 0);
statusbar->setFont(QFont("courier", 12, QFont::Bold));
bInp = new QLineEdit(this);
labelButton = new QPushButton("x", this);
linksButton = new QPushButton("<", this);
rechtsButton = new QPushButton(">", this);
blinksButton = new QPushButton("<-", this);
brechtsButton = new QPushButton("->", this);
rzlinksButton = new QPushButton("<<", this);
rzrechtsButton = new QPushButton(">>", this);
comboLBox = new QComboBox(this);
comboRBox = new QComboBox(this);
comboTief = new QComboBox(this);
bMes = new BMes(this);
bMes->hide();
setFocusPolicy(QWidget::StrongFocus);
comboLBox->setFocusPolicy(QWidget::ClickFocus);
comboRBox->setFocusPolicy(QWidget::ClickFocus);
comboTief->setFocusPolicy(QWidget::ClickFocus); }
Baum::~Baum()
{ delete [] ascii; delete [] w; delete [] s; delete [] r;
delete [] tabl; delete [] tabr;
delete [] stack; delete [] cstack;
delete [] tmpF;
delete [] fifo; }
// destructor
void Baum::topMenu()
{ datei = new QPopupMenu();
menu->insertItem("datei ", datei);
datei->insertItem("baum laden", this, SLOT(dateiLaden()), Qt::CTRL + Qt::Key_O);
datei->insertItem("baum speichern", this, SLOT(dateiSpeichern()), Qt::CTRL + Qt::Key_S);
datei->insertSeparator();
datei->insertItem("baum merge", this, SLOT(baumMerge()), Qt::Key_F3);
datei->insertItem("baum split laden", this, SLOT(splitLaden()), Qt::Key_F8);
datei->insertItem("baum split speichern", this, SLOT(splitSpeichern()), Qt::Key_F4);
datei->insertItem("dbf3-datei importieren", this, SLOT(dbfImport()), Qt::CTRL + Qt::Key_3);
datei->insertItem("csv-datei importieren", this, SLOT(csvImport()), Qt::CTRL + Qt::Key_4);
datei->insertSeparator();
datei->insertItem("quit", app, SLOT(quit()), Qt::CTRL + Qt::Key_Q);
edit = new QPopupMenu();
menu->insertItem("edit ", edit);
edit->insertItem("label setzen", this, SLOT(labelSetzen()), Qt::CTRL + Qt::Key_L);
edit->insertSeparator();
edit->insertItem("steuerzeichen im satz setzen", this, SLOT(steuerzeichenSetzen()), Qt::CTRL + Qt::Key_V);
edit->insertItem("steuerzeichen pro ast setzen", this, SLOT(steuerzeichenAst()), Qt::ALT + Qt::Key_V);
edit->insertItem("seiten vertauschen", this, SLOT(baumDrehen()), Qt::CTRL + Qt::Key_U);
edit->insertSeparator();
edit->insertItem("teilstrings ersetzen", this, SLOT(teilstringErsetzen()), Qt::CTRL + Qt::Key_A);
edit->insertItem("kopieren und ersetzen", this, SLOT(kopierenErsetzen()), Qt::ALT + Qt::Key_A);
edit->insertSeparator();
edit->insertItem("lokalität wechseln", this, SLOT(locModus()), Qt::Key_F2);
edit->insertItem("lokalität setzen", this, SLOT(locSetzen()), Qt::SHIFT + Qt::Key_F2);
edit->insertSeparator();
edit->insertItem("root in clipboard", this, SLOT(rootClipboard()), Qt::Key_F9);
edit->insertItem("clipboard shiften", this, SLOT(shiftClipboard()), Qt::SHIFT + Qt::Key_F9);
edit->insertSeparator();
edit->insertItem("baum dump", this, SLOT(baumDump()), Qt::CTRL + Qt::Key_C);
struktur = new QPopupMenu();
menu->insertItem("struktur ", struktur);
struktur->insertItem("baum ausgleichen", this, SLOT(baumAusgleichen()), Qt::CTRL + Qt::Key_B);
struktur->insertItem("baum rekursiv ausgleichen", this, SLOT(baumAusgleichR()), Qt::ALT + Qt::Key_B);
struktur->insertItem("baum sortieren", this, SLOT(baumSortieren()), Qt::CTRL + Qt::Key_I);
struktur->insertItem("wert sortieren", this, SLOT(wertSortieren()), Qt::ALT + Qt::Key_I);
freeInput = struktur->insertItem("eingabe frei interpretieren", this, SLOT(freieEingabe()), Qt::CTRL + Qt::Key_6);
struktur->setItemChecked(freeInput,TRUE);
struktur->insertSeparator();
struktur->insertItem("lokale baumkopie", this, SLOT(baumKopie()), Qt::CTRL + Qt::Key_W);
struktur->insertItem("teilbaum lokal", this, SLOT(teilBaum()), Qt::CTRL + Qt::Key_K);
struktur->insertSeparator();
struktur->insertItem("baumdaten reorganisieren", this, SLOT(baumReorg()),Qt::Key_F5);
struktur->insertItem("einzelbaum löschen", this, SLOT(clearBaum()),Qt::Key_F6);
struktur->insertItem("papierkorb leeren", this, SLOT(papierKorb()),Qt::Key_F7);
suchen = new QPopupMenu();
menu->insertItem("suchen ", suchen);
suchen->insertItem("finde teilstring", fundList, SLOT(findeString()), Qt::CTRL + Qt::Key_F);
suchen->insertSeparator();
suchen->insertItem("datum-/funktions-match", this, SLOT(labelMatch()), Qt::CTRL + Qt::Key_Z);
suchen->insertItem("suchrahmen match", this, SLOT(astMatch()), Qt::ALT + Qt::Key_Z);
suchen->insertSeparator();
suchen->insertItem("vom häufigsten abnehmend", this, SLOT(CntrlJ1()), Qt::CTRL + Qt::Key_J);
suchen->insertItem("zum häufigsten aufsteigend", this, SLOT(CntrlH1()), Qt::CTRL + Qt::Key_H);
transformation = new QPopupMenu();
menu->insertItem("transform ", transformation);
transformation->insertItem("worte im baum editieren", this, SLOT(baumE()), Qt::CTRL + Qt::Key_E);
transformation->insertItem("label gruppieren", this, SLOT(labelGroup()), Qt::ALT + Qt::Key_G);
transformation->insertItem("eingabemaske (neu)", this, SLOT(eingabeMaske()), Qt::ALT + Qt::Key_E);
transformation->insertItem("eingabemaske (ändern)", this, SLOT(eingabeMaskeReplace()), Qt::ALT + Qt::Key_P);
transformation->insertSeparator();
transformation->insertItem("baum match", this, SLOT(baumMuster()), Qt::CTRL + Qt::Key_M);
transformation->insertItem("baum transformieren", this, SLOT(baumTransform()), Qt::ALT + Qt::Key_M);
transformation->insertSeparator();
transformation->insertItem("((A(BC) => ((AB)C))", this, SLOT(rechtsTransform()), Qt::CTRL + Qt::Key_N);
transformation->insertItem("((AB)C) => (A(BC))", this, SLOT(linksTransform()),Qt::ALT + Qt::Key_N );
programm = new QPopupMenu();
menu->insertItem("programm ", programm);
programm->insertItem("programm compilieren", this, SLOT(compProg()), Qt::ALT + Qt::Key_R);
programm->insertItem("programm starten", this, SLOT(progStart()), Qt::CTRL + Qt::Key_R);
programm->insertItem("programm debuggen", this, SLOT(progDbg()), Qt::CTRL + Qt::Key_X);
programm->insertSeparator();
programm->insertItem("C -> baumsyntax", this, SLOT(cBaum()), Qt::CTRL + Qt::Key_0);
programm->insertItem("editor C -> baumsyntax", this, SLOT(editorC()), Qt::ALT + Qt::Key_0);
programm->insertItem("funktions-baum anzeigen", this, SLOT(functionTree()), Qt::CTRL + Qt::Key_P);
sonstiges = new QPopupMenu();
menu->insertItem("sonstiges ", sonstiges);
sonstiges->insertItem("datum holen", this, SLOT(datumHolen()), Qt::CTRL + Qt::Key_D);
sonstiges->insertItem("zeit holen", this, SLOT(zeitHolen()), Qt::CTRL + Qt::Key_T);
sonstiges->insertItem("datum einfügen", this, SLOT(datumEinfuegen()), Qt::ALT + Qt::Key_D);
sonstiges->insertItem("datumsbaum montieren", this, SLOT(datumsBaum()), Qt::CTRL + Qt::Key_Y);
editor = new QPopupMenu();
menu->insertItem("editor ", editor);
editor->insertItem("baum <~> texteditor", this, SLOT(baumEdit()), Qt::Key_F1);
editor->insertSeparator();
editor->insertItem("ascii/html laden", this, SLOT(asciiLaden()), Qt::SHIFT + Qt::Key_F8);
editor->insertItem("ascii speichern", this, SLOT(asciiSpeichern()), Qt::SHIFT + Qt::Key_F4);
editor->insertSeparator();
// editor->insertItem("baum -> ascii",this, SLOT(baumToAscii()));
// editor->insertItem("ascii -> baum", this, SLOT(asciiToBaum()));
menu->show(); }
void Baum::qConnect()
{ connect(bInp, SIGNAL(textChanged(const QString&)), SLOT(focusA(const QString&)));
connect(linksButton, SIGNAL(clicked()), SLOT(buttonLinks()));
connect(rechtsButton, SIGNAL(clicked()), SLOT(buttonRechts()));
connect(labelButton, SIGNAL(clicked()), SLOT(buttonHoch()));
connect(rzlinksButton, SIGNAL(clicked()), SLOT(buttonRzLinks()));
connect(rzrechtsButton, SIGNAL(clicked()), SLOT(buttonRzRechts()));
connect(blinksButton, SIGNAL(clicked()), SLOT(buttonBLinks()));
connect(brechtsButton, SIGNAL(clicked()), SLOT(buttonBRechts()));
connect(comboLBox, SIGNAL(activated(int)), SLOT(comboIndL(int)));
connect(comboRBox, SIGNAL(activated(int)), SLOT(comboIndR(int)));
connect(comboTief, SIGNAL(activated(int)), SLOT(comboRSatz(int))); }
back to
baumC