edit doxyfile
@@ -1,67 +0,0 @@ | ||
1 | -/*! | |
2 | - \file | |
3 | - \brief URG ポートの表示 | |
4 | - | |
5 | - \author Satofumi KAMIMURA | |
6 | - | |
7 | - $Id$ | |
8 | -*/ | |
9 | - | |
10 | -#include "ViewUrgPortsWidget.h" | |
11 | -#include "FindUrgPorts.h" | |
12 | -#include "IsUsbUrgCom.h" | |
13 | -#include <QShortcut> | |
14 | - | |
15 | -using namespace qrk; | |
16 | - | |
17 | - | |
18 | -struct ViewUrgPortsWidget::pImpl { | |
19 | - | |
20 | - | |
21 | - void initializeForm(ViewUrgPortsWidget* parent) { | |
22 | - | |
23 | - // シグナルの接続 | |
24 | - connect(parent->rescan_button_, SIGNAL(clicked()), | |
25 | - parent, SLOT(rescanHandler())); | |
26 | - } | |
27 | - | |
28 | - | |
29 | - void rescanPorts(ViewUrgPortsWidget* parent) { | |
30 | - | |
31 | - FindUrgPorts urg_finder; | |
32 | - std::vector<std::string> urg_ports = urg_finder.find(); | |
33 | - | |
34 | - parent->ports_list_widget_->clear(); | |
35 | - | |
36 | - for (std::vector<std::string>::iterator it = urg_ports.begin(); | |
37 | - it != urg_ports.end(); ++it) { | |
38 | - std::string view_name = *it | |
39 | - + (isUsbUrgCom(it->c_str()) ? " [URG]" : ""); | |
40 | - | |
41 | - parent->ports_list_widget_->addItem(view_name.c_str()); | |
42 | - } | |
43 | - } | |
44 | -}; | |
45 | - | |
46 | - | |
47 | -ViewUrgPortsWidget::ViewUrgPortsWidget(QWidget* parent) | |
48 | - : QWidget(parent), pimpl(new pImpl) { | |
49 | - setupUi(this); | |
50 | - | |
51 | - // フォームを初期化し、最初の表示を行う | |
52 | - pimpl->initializeForm(this); | |
53 | - pimpl->rescanPorts(this); | |
54 | - | |
55 | - // Ctrl-q で終了させる | |
56 | - (void) new QShortcut(Qt::CTRL + Qt::Key_Q, this, SLOT(close())); | |
57 | -} | |
58 | - | |
59 | - | |
60 | -ViewUrgPortsWidget::~ViewUrgPortsWidget(void) { | |
61 | -} | |
62 | - | |
63 | - | |
64 | -void ViewUrgPortsWidget::rescanHandler(void) { | |
65 | - | |
66 | - pimpl->rescanPorts(this); | |
67 | -} |
@@ -1,33 +0,0 @@ | ||
1 | -#ifndef VIEW_URG_PORTS_WIDGET_H | |
2 | -#define VIEW_URG_PORTS_WIDGET_H | |
3 | - | |
4 | -/*! | |
5 | - \file | |
6 | - \brief URG ポートの表示 | |
7 | - | |
8 | - \author Satofumi KAMIMURA | |
9 | - | |
10 | - $Id$ | |
11 | -*/ | |
12 | - | |
13 | -#include "ui_ViewUrgPortsWidgetForm.h" | |
14 | - | |
15 | - | |
16 | -class ViewUrgPortsWidget : public QWidget, private Ui::ViewUrgPortsWidgetForm { | |
17 | - Q_OBJECT; | |
18 | - | |
19 | - ViewUrgPortsWidget(const ViewUrgPortsWidget& rhs); | |
20 | - ViewUrgPortsWidget& operator = (const ViewUrgPortsWidget& rhs); | |
21 | - | |
22 | - struct pImpl; | |
23 | - std::auto_ptr<pImpl> pimpl; | |
24 | - | |
25 | -private slots: | |
26 | - void rescanHandler(void); | |
27 | - | |
28 | -public: | |
29 | - ViewUrgPortsWidget(QWidget* parent = 0); | |
30 | - ~ViewUrgPortsWidget(void); | |
31 | -}; | |
32 | - | |
33 | -#endif /* !VIEW_URG_PORTS_WIDGET_H */ |
@@ -1,25 +0,0 @@ | ||
1 | -/*! | |
2 | - \file | |
3 | - \brief Windows における URG のポート番号を表示する | |
4 | - | |
5 | - \author Satofumi KAMIMURA | |
6 | - | |
7 | - $Id$ | |
8 | -*/ | |
9 | - | |
10 | -#include <QApplication> | |
11 | -#include "ViewUrgPortsWidget.h" | |
12 | - | |
13 | - | |
14 | -int main(int argc, char *argv[]) { | |
15 | - | |
16 | - QApplication app(argc, argv); | |
17 | - | |
18 | - // ロケールの設定 | |
19 | - // !!! | |
20 | - | |
21 | - // アプリケーションの起動 | |
22 | - ViewUrgPortsWidget window; | |
23 | - window.show(); | |
24 | - return app.exec(); | |
25 | -} |
@@ -23,4 +23,4 @@ | ||
23 | 23 | -cd ScipAnalyzer/ && (if test -f Makefile; then ${MAKE} distclean; fi) |
24 | 24 | -cd ScipPlot/ && (if test -f Makefile; then ${MAKE} distclean; fi) |
25 | 25 | -cd ScipLogPlayer/ && (if test -f Makefile; then ${MAKE} distclean; fi) |
26 | - -cd ViewUrgPorts/ && (if test -f Makefile; then ${MAKE} distclean; fi) | |
\ No newline at end of file | ||
26 | + -cd ViewUrgPort/ && (if test -f Makefile; then ${MAKE} distclean; fi) | |
\ No newline at end of file |
@@ -0,0 +1,67 @@ | ||
1 | +/*! | |
2 | + \file | |
3 | + \brief URG ポートの表示 | |
4 | + | |
5 | + \author Satofumi KAMIMURA | |
6 | + | |
7 | + $Id$ | |
8 | +*/ | |
9 | + | |
10 | +#include "ViewUrgPortsWidget.h" | |
11 | +#include "FindUrgPorts.h" | |
12 | +#include "IsUsbUrgCom.h" | |
13 | +#include <QShortcut> | |
14 | + | |
15 | +using namespace qrk; | |
16 | + | |
17 | + | |
18 | +struct ViewUrgPortsWidget::pImpl { | |
19 | + | |
20 | + | |
21 | + void initializeForm(ViewUrgPortsWidget* parent) { | |
22 | + | |
23 | + // シグナルの接続 | |
24 | + connect(parent->rescan_button_, SIGNAL(clicked()), | |
25 | + parent, SLOT(rescanHandler())); | |
26 | + } | |
27 | + | |
28 | + | |
29 | + void rescanPorts(ViewUrgPortsWidget* parent) { | |
30 | + | |
31 | + FindUrgPorts urg_finder; | |
32 | + std::vector<std::string> urg_ports = urg_finder.find(); | |
33 | + | |
34 | + parent->ports_list_widget_->clear(); | |
35 | + | |
36 | + for (std::vector<std::string>::iterator it = urg_ports.begin(); | |
37 | + it != urg_ports.end(); ++it) { | |
38 | + std::string view_name = *it | |
39 | + + (isUsbUrgCom(it->c_str()) ? " [URG]" : ""); | |
40 | + | |
41 | + parent->ports_list_widget_->addItem(view_name.c_str()); | |
42 | + } | |
43 | + } | |
44 | +}; | |
45 | + | |
46 | + | |
47 | +ViewUrgPortsWidget::ViewUrgPortsWidget(QWidget* parent) | |
48 | + : QWidget(parent), pimpl(new pImpl) { | |
49 | + setupUi(this); | |
50 | + | |
51 | + // フォームを初期化し、最初の表示を行う | |
52 | + pimpl->initializeForm(this); | |
53 | + pimpl->rescanPorts(this); | |
54 | + | |
55 | + // Ctrl-q で終了させる | |
56 | + (void) new QShortcut(Qt::CTRL + Qt::Key_Q, this, SLOT(close())); | |
57 | +} | |
58 | + | |
59 | + | |
60 | +ViewUrgPortsWidget::~ViewUrgPortsWidget(void) { | |
61 | +} | |
62 | + | |
63 | + | |
64 | +void ViewUrgPortsWidget::rescanHandler(void) { | |
65 | + | |
66 | + pimpl->rescanPorts(this); | |
67 | +} |
@@ -0,0 +1,33 @@ | ||
1 | +#ifndef VIEW_URG_PORTS_WIDGET_H | |
2 | +#define VIEW_URG_PORTS_WIDGET_H | |
3 | + | |
4 | +/*! | |
5 | + \file | |
6 | + \brief URG ポートの表示 | |
7 | + | |
8 | + \author Satofumi KAMIMURA | |
9 | + | |
10 | + $Id$ | |
11 | +*/ | |
12 | + | |
13 | +#include "ui_ViewUrgPortsWidgetForm.h" | |
14 | + | |
15 | + | |
16 | +class ViewUrgPortsWidget : public QWidget, private Ui::ViewUrgPortsWidgetForm { | |
17 | + Q_OBJECT; | |
18 | + | |
19 | + ViewUrgPortsWidget(const ViewUrgPortsWidget& rhs); | |
20 | + ViewUrgPortsWidget& operator = (const ViewUrgPortsWidget& rhs); | |
21 | + | |
22 | + struct pImpl; | |
23 | + std::auto_ptr<pImpl> pimpl; | |
24 | + | |
25 | +private slots: | |
26 | + void rescanHandler(void); | |
27 | + | |
28 | +public: | |
29 | + ViewUrgPortsWidget(QWidget* parent = 0); | |
30 | + ~ViewUrgPortsWidget(void); | |
31 | +}; | |
32 | + | |
33 | +#endif /* !VIEW_URG_PORTS_WIDGET_H */ |
@@ -0,0 +1,25 @@ | ||
1 | +/*! | |
2 | + \file | |
3 | + \brief Windows における URG のポート番号を表示する | |
4 | + | |
5 | + \author Satofumi KAMIMURA | |
6 | + | |
7 | + $Id$ | |
8 | +*/ | |
9 | + | |
10 | +#include <QApplication> | |
11 | +#include "ViewUrgPortsWidget.h" | |
12 | + | |
13 | + | |
14 | +int main(int argc, char *argv[]) { | |
15 | + | |
16 | + QApplication app(argc, argv); | |
17 | + | |
18 | + // ロケールの設定 | |
19 | + // !!! | |
20 | + | |
21 | + // アプリケーションの起動 | |
22 | + ViewUrgPortsWidget window; | |
23 | + window.show(); | |
24 | + return app.exec(); | |
25 | +} |