void WifiCategoryItemComponent::disableWifiActions() {
  spinner->show();
  icon->setVisible(false);
  
  button->setEnabled(getWifiStatus().isEnabled());
  toggle->setEnabled(false);
  
  updateButtonText();
  toggle->setToggleState(getWifiStatus().isEnabled(), NotificationType::dontSendNotification);
}
Пример #2
0
Controles::Controles(int iInitLargeur, int iInitIteration, QWidget *parent) :
	QWidget(parent, Qt::Tool),
	ui(new Ui::Controles),
	lectureEnCours(false)
{
	ui->setupUi(this);

	ui->largeurSlider->setValue(iInitLargeur);
	ui->iterationSlider->setValue(iInitIteration);
	updateButtonText(false);
}
WifiCategoryItemComponent::WifiCategoryItemComponent() :
  SettingsCategoryItemComponent("wifi"),
  spinner(new WifiSpinner("SettingsWifiSpinner"))
{
  iconDrawable =
      Drawable::createFromImageFile(assetFile("wifiIcon.png"));
  icon->setImages(iconDrawable);
  bool isEnabled = getWifiStatus().isEnabled();
  toggle->setToggleState(isEnabled, NotificationType::dontSendNotification);
  button->setEnabled(isEnabled);
  addChildComponent(spinner);
  updateButtonText();
}
Пример #4
0
FileButton::FileButton (QWidget *w, QStringList &l, QString &p) : QPushButton (w)
{
  QObject::connect(this, SIGNAL(clicked()), this, SLOT(fileDialog()));
  setMaximumHeight(25);
  setToggleButton(FALSE);
  fileList = l;

  path = QDir::homeDirPath();
  if (p.length())
    path = p;

  updateButtonText();
}
Пример #5
0
void FileButton::fileDialog ()
{
  if (fileList.count())
  {
    QFileInfo fi(fileList[0]);
    path = fi.dirPath(TRUE);
  }

  QStringList l = Q3FileDialog::getOpenFileNames("*", path, this, "file dialog");
  if (l.count())
    fileList = l;

  updateButtonText();
}
Пример #6
0
void Controles::on_button_clicked()
{
	lectureEnCours = !lectureEnCours;
	updateButtonText(lectureEnCours);
	ui->largeurSlider->setEnabled(!lectureEnCours);

	if(lectureEnCours)
	{
		emit lecture();
	}
	else
	{
		emit pause();
	}
}
Пример #7
0
FileDialogPropertyWidget::FileDialogPropertyWidget(FileDialogProperty* prop, QWidget* parent)
    : QPropertyWidget(prop, parent)
    , property_(prop)
    , openFileDialogBtn_(new QPushButton)
{
    updateButtonText(prop->get());

    connect(openFileDialogBtn_, SIGNAL(clicked(void)), this, SLOT(setProperty(void)));

    addWidget(openFileDialogBtn_);

    addVisibilityControls();

    QFontInfo fontInfo(font());
    openFileDialogBtn_->setFont(QFont(fontInfo.family(), QPropertyWidget::fontSize_));
}
Пример #8
0
TargetButton::TargetButton(QString full_path, QWidget *parent):
	QPushButton(parent),
	Target(full_path),
	ftp(NULL),
	upload_file(NULL),
	upload_id(-1),
	done_id(-1),
	m_image_count(0) {

	setContextMenuPolicy(Qt::CustomContextMenu);
	updateButtonText();
	connect(this, SIGNAL(clicked()), SLOT(emitClickedWithPath()));
	connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(targetMenu(QPoint)));

//	uploadAction = new QAction(tr("Upload"), this);
//	connect(uploadAction, SIGNAL(triggered()), SLOT(upload()));
	viewAction = new QAction(tr("View"), this);
	removeAction = new QAction(tr("Remove"), this);

	ftp = new QFtp(this);
	connect(ftp, SIGNAL(commandFinished(int,bool)), SLOT(cleanupCommand(int,bool)));
}
Пример #9
0
void CardEditor::setMapping(QFontDialog *dialog, QPushButton *button){
	dialog2button.insert(dialog, button);

	connect(dialog, SIGNAL(currentFontChanged(QFont)), this, SLOT(updateButtonText(QFont)));
	connect(button, SIGNAL(clicked()), dialog, SLOT(exec()));
}
void SettingsCategoryItemComponent::enablementChanged() {
  updateButtonText();
}
void BluetoothCategoryItemComponent::enabledStateChanged(bool enabled) {
  getBluetoothStatus().enabled = enabled;
  button->setEnabled(enabled);
  updateButtonText();
}
BluetoothCategoryItemComponent::BluetoothCategoryItemComponent()
: SettingsCategoryItemComponent("bluetooth") {
  iconDrawable = Drawable::createFromImageFile(assetFile("bluetoothIcon.png"));
  icon->setImages(iconDrawable);
  updateButtonText();
}
void WifiCategoryItemComponent::enabledStateChanged(bool enabled) {
  updateButtonText();
  
  enabled ? getWifiStatus().setEnabled() : getWifiStatus().setDisabled();
}
Пример #14
0
void FileButton::setFile (QStringList &l)
{
  fileList = l;
  updateButtonText();
}
Пример #15
0
void FileDialogPropertyWidget::updateFromPropertySlot() {
    updateButtonText(property_->get());
}
Пример #16
0
void TargetButton::incrementImageCount() { m_image_count++; updateButtonText(); }