diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 17:25:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 17:25:43 -0600 |
commit | d888cfa39e8b38abe17f3d425d19cb8235136a79 (patch) | |
tree | 7ae5487b84106036fdb781beec26fab10678a595 /tdeui/tests/tdepopuptest.cpp | |
parent | deac2ca49faed824fe83066080714eb6d653615b (diff) | |
download | tdelibs-d888cfa39e8b38abe17f3d425d19cb8235136a79.tar.gz tdelibs-d888cfa39e8b38abe17f3d425d19cb8235136a79.zip |
Fix FTBFS
Diffstat (limited to 'tdeui/tests/tdepopuptest.cpp')
-rw-r--r-- | tdeui/tests/tdepopuptest.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tdeui/tests/tdepopuptest.cpp b/tdeui/tests/tdepopuptest.cpp new file mode 100644 index 000000000..89c932f46 --- /dev/null +++ b/tdeui/tests/tdepopuptest.cpp @@ -0,0 +1,40 @@ +#include <kapplication.h> +#include <tqwidget.h> +#include <tqcursor.h> +#include "kpopupmenu.h" + +class DemoWidget : public TQWidget { +private: + TDEPopupMenu *menu; + +void mousePressEvent(TQMouseEvent *) +{ + menu->popup(TQCursor::pos()); +} + +void paintEvent(TQPaintEvent *) +{ + drawText(32, 32, "Press a Mouse Button!"); +} + +public: + DemoWidget() : TQWidget() + { + menu = new TDEPopupMenu("Popup Menu:"); + menu->insertItem("Item1"); + menu->insertItem("Item2"); + menu->insertSeparator(); + menu->insertItem("Quit", tqApp, TQT_SLOT(quit())); + } +}; + +int main(int argc, char **argv) +{ + TDEApplication app(argc, argv, "kpopupmenutest"); + DemoWidget w; + app.setMainWidget(&w); + w.setFont(TQFont("helvetica", 12, TQFont::Bold), true); + w.show(); + return app.exec(); +} + |