* 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 <http://www.gnu.org/licenses/>.
*/
-#include <stdint.h>
-#include <assert.h>
+#include <cassert>
+#include <cstdint>
#include <QSpinBox>
namespace prop {
Int::Int(QString name,
+ QString desc,
QString suffix,
optional< pair<int64_t, int64_t> > range,
Getter getter,
Setter setter) :
- Property(name, getter, setter),
+ Property(name, desc, getter, setter),
suffix_(suffix),
range_(range),
spin_box_(nullptr)
range_min = 0, range_max = UINT64_MAX;
} else {
// Unexpected value type.
- assert(0);
+ assert(false);
}
// @todo Sigrok supports 64-bit quantities, but Qt does not have a
new_value = g_variant_new_int64(spin_box_->value());
else if (g_variant_type_equal(type, G_VARIANT_TYPE_UINT64))
new_value = g_variant_new_uint64(spin_box_->value());
- else
- {
+ else {
// Unexpected value type.
- assert(0);
+ assert(false);
}
assert(new_value);
commit();
}
-} // prop
-} // pv
+} // namespace prop
+} // namespace pv