Redesigned FieldButton.

This commit is contained in:
Jim Evins
2019-07-20 23:18:03 -04:00
parent d9a41c66f0
commit 4e94933dcf
6 changed files with 182 additions and 166 deletions
+13 -9
View File
@@ -1,6 +1,6 @@
/* FieldButton.h
*
* Copyright (C) 2014-2016 Jim Evins <evins@snaught.com>
* Copyright (C) 2019 Jim Evins <evins@snaught.com>
*
* This file is part of gLabels-qt.
*
@@ -22,8 +22,13 @@
#define FieldButton_h
#include <QComboBox>
#include <QString>
#include "model/Variables.h"
#include "merge/Merge.h"
#include <QAction>
#include <QPushButton>
#include <QMenu>
#include <QStringList>
namespace glabels
@@ -32,7 +37,7 @@ namespace glabels
///
/// Field Button
///
class FieldButton : public QComboBox
class FieldButton : public QPushButton
{
Q_OBJECT
@@ -54,23 +59,22 @@ namespace glabels
// Public Methods
/////////////////////////////////
public:
void setName( const QString& name = "" );
void setKeys( const QStringList& keyList );
void clearKeys();
void setKeys( const merge::Merge* merge,
const model::Variables* variables );
/////////////////////////////////
// Slots
/////////////////////////////////
private slots:
void onIndexChanged( int index );
void onMenuActionTriggered( QAction* action );
/////////////////////////////////
// Private Data
/////////////////////////////////
private:
QString mName;
QMenu mMenu;
};