Don't try to copy the category from the group if no category exists.
[asterisk-bristuff.git] / pbx / pbx_kdeconsole.cc
blob4a9af64d3fc4c2de6f8f46df5ad1deaa3e04a204
1 /*
2 * Asterisk -- A telephony toolkit for Linux.
4 * KDE Console monitor -- Class implmementation
5 *
6 * Copyright (C) 1999, Mark Spencer
8 * Mark Spencer <markster@linux-support.net>
10 * This program is free software, distributed under the terms of
11 * the GNU General Public License
14 /*** MODULEINFO
15 <depend>qt</depend>
16 <defaultenabled>no</defaultenabled>
17 ***/
19 #include "pbx_kdeconsole.moc"
21 KAsteriskConsole::KAsteriskConsole() : KTMainWindow()
23 QVBoxLayout *box;
24 QFrame *f;
26 f = new QFrame(this);
28 setGeometry(100,100,600,400);
29 /* Menus */
30 file = new QPopupMenu();
31 file->insertItem("&Exit", this, SLOT(slotExit()));
33 help = kapp->getHelpMenu(TRUE, "KDE Asterisk Console\nby Mark Spencer");
35 setCaption("Asterisk Console");
37 /* Box */
38 box = new QVBoxLayout(f, 20, 5);
40 /* Menu bar creation */
41 menu = new KMenuBar(this);
42 menu->insertItem("&File", file);
43 menu->insertItem("&Help", help);
44 /* Verbose stuff */
45 verbose = new QListBox(f, "verbose");
46 /* Exit button */
47 btnExit = new QPushButton("Exit", f, "exit");
48 btnExit->show();
49 connect(btnExit, SIGNAL(clicked()), this, SLOT(slotExit()));
51 box->addWidget(verbose, 1);
52 box->addWidget(btnExit, 0);
53 setView(f, TRUE);
54 statusBar()->message("Ready", 2000);
57 void KAsteriskConsole::slotExit()
59 close();
62 void KAsteriskConsole::closeEvent(QCloseEvent *)
64 kapp->quit();