diff --git a/main.cpp b/main.cpp index 88b2d51..89c4a41 100644 --- a/main.cpp +++ b/main.cpp @@ -7,11 +7,20 @@ #include "version.h" int main(int argc, char *argv[]) { - argparse::ArgumentParser parser("labelme++"); - parser.add_argument("-V", "--version") + argparse::ArgumentParser parser("labelme++", "0.0", + argparse::default_arguments::none); + parser.add_argument("--version", "-v") .default_value(false) .implicit_value(true) .help("show version"); + parser.add_argument("--reset-config") + .default_value(false) + .implicit_value(true) + .help("reset qt config"); + parser.add_argument("--logger-level") + .default_value(std::string{"debug"}) + .choices("debug", "info", "warning", "fatal", "error") + .help("logger level"); try { parser.parse_args(argc, argv); diff --git a/widgets/label_dialog.h b/widgets/label_dialog.h index bd66e88..958ffa2 100644 --- a/widgets/label_dialog.h +++ b/widgets/label_dialog.h @@ -24,9 +24,8 @@ class LabelDialog : public QDialog { public: explicit LabelDialog(const QString& text = "Enter object label", QWidget* parent = nullptr, - const QStringList& labels = {}, - const bool sort_labels = true, - const bool show_text_field = true, + const QStringList& labels = {}, bool sort_labels = true, + bool show_text_field = true, const QString& completion = "startwith", const std::map& fit_to_content = {}, const std::map& flags = {});