Skip to content

Commit

Permalink
Removed Create Connect button and Create Connected State Label
Browse files Browse the repository at this point in the history
  • Loading branch information
erinharrington-12 committed Apr 2, 2024
1 parent 0b67367 commit 4919972
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 83 deletions.
23 changes: 4 additions & 19 deletions src/Create3Widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ Create3Widget::Create3Widget(Device *device, QWidget *parent)
ui->setupUi(this);
performStandardSetup(tr("Create 3"), false);
setStyleSheet("QScrollBar:vertical {border: 2px solid grey;background:grey ;width: 100px; margin: 22px 0 22px 0; } QScrollBar::handle:vertical { border: 2px solid grey;background: white; min-height: 20px; } QScrollBar::add-line:vertical { border: 2px solid grey;background: #32CC99; height: 20px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical {border: 2px solid grey; background: #32CC99; height: 20px; subcontrol-position: top; subcontrol-origin: margin; } QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { border: 2px solid grey;width: 3px; height: 3px; background: white; }QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {border: 2px solid grey; background: none;}");
connect(ui->CreateConnectButton, SIGNAL(clicked()), SLOT(create3Connect()));
// connect(ui->ResetServerButton, SIGNAL(clicked()), SLOT(resetServer()));

connect(ui->Create3SensorListButton, SIGNAL(clicked()), SLOT(sensorList()));
connect(ui->Create3ExampleProgramButton, SIGNAL(clicked()), SLOT(exampleList()));

Expand Down Expand Up @@ -69,19 +68,7 @@ Create3Widget::Create3Widget(Device *device, QWidget *parent)

connect(ui->toggleSwitch, SIGNAL(stateChanged(int)), this, SLOT(toggleChanged()));

if(ui->create3IP->text() == ""){
ui->CreateConnectButton->setEnabled(false);
ui->Create3SensorListButton->setEnabled(false);
ui->Create3ExampleProgramButton->setEnabled(false);
ui->toggleSwitch->setEnabled(false);
}
else{
ui->CreateConnectButton->setEnabled(true);
ui->Create3SensorListButton->setEnabled(true);
ui->Create3ExampleProgramButton->setEnabled(true);
ui->toggleSwitch->setEnabled(true);

}
}

Create3Widget::~Create3Widget()
Expand All @@ -93,7 +80,7 @@ void Create3Widget::toggleChanged()
{

StandardWidget::disableMenuBar();
ui->CreateConnectButton->setEnabled(false);

ui->toggleSwitch->setEnabled(false);
ui->Create3SensorListButton->setEnabled(false);
ui->Create3ExampleProgramButton->setEnabled(false);
Expand All @@ -120,7 +107,6 @@ void Create3Widget::toggleChanged()

StandardWidget::enableMenuBar();
ui->toggleSwitch->setChecked(false); //Wifi toggle side
ui->CreateConnectButton->setEnabled(true);
ui->toggleSwitch->setEnabled(true);
ui->Create3SensorListButton->setEnabled(true);
ui->Create3ExampleProgramButton->setEnabled(true);
Expand All @@ -142,7 +128,6 @@ void Create3Widget::toggleChanged()

StandardWidget::enableMenuBar();
ui->toggleSwitch->setChecked(true); //Ethernet toggle side
ui->CreateConnectButton->setEnabled(true);
ui->toggleSwitch->setEnabled(true);
ui->Create3SensorListButton->setEnabled(true);
ui->Create3ExampleProgramButton->setEnabled(true);
Expand Down Expand Up @@ -218,11 +203,11 @@ void Create3Widget::create3Connect()
if (connected == 1)
{
qDebug() << "Create connected";
ui->createConnectState->setText("Connected");

}
else
{
qDebug() << "Create not connected";
ui->createConnectState->setText("Not Connected");

}
}
64 changes: 0 additions & 64 deletions ui/Create3Widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,6 @@
<property name="leftMargin">
<number>0</number>
</property>
<item alignment="Qt::AlignLeft">
<widget class="QPushButton" name="CreateConnectButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>1</width>
<height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<pointsize>33</pointsize>
</font>
</property>
<property name="text">
<string>Create Connect</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
Expand Down Expand Up @@ -162,37 +129,6 @@ QCheckBox::indicator:unchecked{
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="CreateConnectHorizontal">
<item>
<widget class="QLabel" name="createConnectLabel">
<property name="font">
<font>
<pointsize>22</pointsize>
</font>
</property>
<property name="text">
<string>Create3 Connected State:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="createConnectState">
<property name="font">
<font>
<pointsize>22</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="IPHorizontal">
<item>
Expand Down

0 comments on commit 4919972

Please sign in to comment.