X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fwidgets%2Fpopuptoolbutton.cpp;h=3fc2eb20aa9be8e15c6f267a5aed8ebb6769c0bb;hb=93cc1067d3b87a5f5dda6a5ee7dcf83d179c9b6b;hp=c3e938e05b2a117f240fbc6a82a224a413ef4e1f;hpb=afc864a06f3486ec00588151ade19ee6375de049;p=pulseview.git
diff --git a/pv/widgets/popuptoolbutton.cpp b/pv/widgets/popuptoolbutton.cpp
index c3e938e..3fc2eb2 100644
--- a/pv/widgets/popuptoolbutton.cpp
+++ b/pv/widgets/popuptoolbutton.cpp
@@ -14,44 +14,44 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
-#include
+#include
-#include "popuptoolbutton.h"
+#include "popuptoolbutton.hpp"
namespace pv {
namespace widgets {
PopupToolButton::PopupToolButton(QWidget *parent) :
- QToolButton(parent)
+ QToolButton(parent),
+ popup_(nullptr)
{
connect(this, SIGNAL(clicked(bool)), this, SLOT(on_clicked(bool)));
}
Popup* PopupToolButton::popup() const
{
- return _popup;
+ return popup_;
}
void PopupToolButton::set_popup(Popup *popup)
{
assert(popup);
- _popup = popup;
+ popup_ = popup;
}
void PopupToolButton::on_clicked(bool)
{
- if(!_popup)
+ if (!popup_)
return;
const QRect r = rect();
- _popup->set_position(mapToGlobal(QPoint((r.left() + r.right()) / 2,
+ popup_->set_position(mapToGlobal(QPoint((r.left() + r.right()) / 2,
((r.top() + r.bottom() * 3) / 4))), Popup::Bottom);
- _popup->show();
+ popup_->show();
}
-} // widgets
-} // pv
+} // namespace widgets
+} // namespace pv