source: src-qt4/pc-zmanager/dialogmount.cpp @ 125dbc9

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 125dbc9 was 125dbc9, checked in by Kris Moore <kris@…>, 9 months ago

Welcome the new 'pc-zmanager' for ZFS & Disk Management

A HUGE Thank You to: Claudio L <claudio@…>

Update pkg-plist and add it to the control panel

  • Property mode set to 100644
File size: 833 bytes
Line 
1#include "dialogmount.h"
2#include "ui_dialogmount.h"
3#include <QFileDialog>
4DialogMount::DialogMount(QWidget *parent) :
5    QDialog(parent),
6    ui(new Ui::DialogMount)
7{
8    ui->setupUi(this);
9}
10
11DialogMount::~DialogMount()
12{
13    delete ui;
14}
15
16
17void DialogMount::setDevice(vdev_t *device)
18{
19    ui->labelDevice->setText(device->Name);
20
21
22}
23
24void DialogMount::on_browseButton_clicked()
25{
26    QFileDialog dlg(this,tr("Select Directory"),"/mnt");
27    dlg.setFileMode(QFileDialog::Directory);
28    dlg.setAcceptMode(QFileDialog::AcceptOpen);
29    dlg.setOption(QFileDialog::ShowDirsOnly,true);
30
31    int result=dlg.exec();
32
33    if(result) {
34        QStringList a=dlg.selectedFiles();
35
36        if(a.count()>0) ui->mountLocation->setText(a.at(0));
37
38    }
39
40}
41
42QString DialogMount::getMountLocation()
43{
44    return ui->mountLocation->text();
45};
Note: See TracBrowser for help on using the repository browser.