| 72 | } |
| 73 | |
| 74 | RemoteManager::RemoteManager(ICaptureContext &ctx, MainWindow *main) |
| 75 | : QDialog(NULL), ui(new Ui::RemoteManager), m_Ctx(ctx), m_Main(main) |
| 76 | { |
| 77 | ui->setupUi(this); |
| 78 | |
| 79 | m_ExternalRef.release(1); |
| 80 | |
| 81 | ui->hosts->setFont(Formatter::PreferredFont()); |
| 82 | ui->hostname->setFont(Formatter::PreferredFont()); |
| 83 | ui->runCommand->setFont(Formatter::PreferredFont()); |
| 84 | |
| 85 | ui->hosts->setColumns({tr("Hostname"), tr("Running")}); |
| 86 | |
| 87 | ui->hosts->header()->setSectionResizeMode(0, QHeaderView::Stretch); |
| 88 | ui->hosts->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents); |
| 89 | |
| 90 | setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); |
| 91 | |
| 92 | lookupsProgressFlow = new QWidget(this); |
| 93 | |
| 94 | FlowLayout *flow = new FlowLayout(lookupsProgressFlow, 0, 3, 3); |
| 95 | |
| 96 | lookupsProgressFlow->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); |
| 97 | |
| 98 | flow->addWidget(ui->progressIcon); |
| 99 | flow->addWidget(ui->progressText); |
| 100 | flow->addWidget(ui->progressCount); |
| 101 | |
| 102 | QVBoxLayout *vertical = new QVBoxLayout(this); |
| 103 | |
| 104 | vertical->addWidget(ui->hosts); |
| 105 | vertical->addWidget(lookupsProgressFlow); |
| 106 | vertical->addWidget(ui->bottomLayout->parentWidget()); |
| 107 | |
| 108 | for(RemoteHost h : m_Ctx.Config().GetRemoteHosts()) |
| 109 | addHost(h); |
| 110 | |
| 111 | on_hosts_itemSelectionChanged(); |
| 112 | } |
| 113 | |
| 114 | RemoteManager::~RemoteManager() |
| 115 | { |
nothing calls this directly
no test coverage detected