<commit_before>// Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "OrbitStartupWindow.h"

#include <QAbstractItemView>
#include <QApplication>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QGridLayout>
#include <QHeaderView>
#include <QItemSelectionModel>
#include <QLabel>
#include <QMessageBox>
#include <QPushButton>
#include <QTableView>
#include <QVector>

#include "OrbitBase/Logging.h"
#include "OrbitGgp/GgpClient.h"
#include "OrbitGgp/GgpInstance.h"
#include "OrbitGgp/GgpInstanceItemModel.h"
#include "OrbitGgp/GgpSshInfo.h"
#include "Path.h"

OrbitStartupWindow::OrbitStartupWindow(QWidget* parent)
    : QDialog{parent, Qt::Dialog},
      model_{new GgpInstanceItemModel{{}, this}} {
  // General UI
  const int width = 700;
  const int height = 400;
  setMinimumSize(QSize(width, height));
  setSizeGripEnabled(true);

  // Layout
  const auto layout = QPointer{new QGridLayout{this}};

  // Top label
  const auto label = QPointer{new QLabel{"Choose profiling target:"}};
  layout->addWidget(label, 0, 0);

  // Refresh Button
  const auto refresh_button = QPointer{new QPushButton{this}};
  refresh_button->setIcon(
      QApplication::style()->standardIcon(QStyle::SP_BrowserReload));
  layout->addWidget(refresh_button, 0, 1, Qt::AlignRight);
  QObject::connect(
      refresh_button, &QPushButton::clicked, this,
      [this, refresh_button]() { ReloadInstances(refresh_button); });

  // Main content table
  const auto table_view = QPointer{new QTableView{}};
  table_view->setSelectionMode(<commit_msg>Applied clang-format to OrbitStartupWindow.cpp<commit_after>// Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "OrbitStartupWindow.h"

#include <QAbstractItemView>
#include <QApplication>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QGridLayout>
#include <QHeaderView>
#include <QItemSelectionModel>
#include <QLabel>
#include <QMessageBox>
#include <QPushButton>
#include <QTableView>
#include <QVector>

#include "OrbitBase/Logging.h"
#include "OrbitGgp/GgpClient.h"
#include "OrbitGgp/GgpInstance.h"
#include "OrbitGgp/GgpInstanceItemModel.h"
#include "OrbitGgp/GgpSshInfo.h"
#include "Path.h"

OrbitStartupWindow::OrbitStartupWindow(QWidget* parent)
    : QDialog{parent, Qt::Dialog}, model_{new GgpInstanceItemModel{{}, this}} {
  // General UI
  const int width = 700;
  const int height = 400;
  setMinimumSize(QSize(width, height));
  setSizeGripEnabled(true);

  // Layout
  const auto layout = QPointer{new QGridLayout{this}};

  // Top label
  const auto label = QPointer{new QLabel{"Choose profiling target:"}};
  layout->addWidget(label, 0, 0);

  // Refresh Button
  const auto refresh_button = QPointer{new QPushButton{this}};
  refresh_button->setIcon(
      QApplication::style()->standardIcon(QStyle::SP_BrowserReload));
  layout->addWidget(refresh_button, 0, 1, Qt::AlignRight);
  QObject::connect(
      refresh_button, &QPushButton::clicked, this,
      [this, refresh_button]() { ReloadInstances(refresh_button); });

  // Main content table
  const auto table_view = QPointer{new QTableView{}};
  table_view->setSelectionMode(
{'fraction_non_alphanumeric': 0.1258574410975246, 'fraction_numerical': 0.008350730688935281, 'mean_word_length': 5.474903474903475, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2736878', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1097, 'n_words': 270}