mirror of
https://github.com/august-alt/gpui.git
synced 2025-03-14 12:58:39 +03:00
wip: add InputMessageNotifier
into FilesWidget
This commit is contained in:
parent
3e5b5a347a
commit
8c01066e53
@ -40,6 +40,12 @@ FilesWidget::FilesWidget(QWidget *parent, FilesItem *item)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->inputMessage->addInstance("source_file");
|
||||
ui->inputMessage->addInstance("destination");
|
||||
|
||||
ui->inputMessage->setInstanceDetection("source_file", InputMessageNotifier::MessageNotifierType::INVISIBLE_SPACE);
|
||||
ui->inputMessage->setInstanceDetection("destination", InputMessageNotifier::MessageNotifierType::INVISIBLE_SPACE);
|
||||
|
||||
on_actionComboBox_currentIndexChanged(ui->actionComboBox->currentIndex());
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,7 @@ private slots:
|
||||
void on_actionComboBox_currentIndexChanged(int index);
|
||||
void on_destinationToolButton_clicked();
|
||||
void on_sourceLineEdit_textChanged(const QString &text);
|
||||
void on_destinationLineEdit_textChanged(const QString &text);
|
||||
void on_sourceToolButton_clicked();
|
||||
|
||||
private:
|
||||
|
@ -117,6 +117,9 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="preferences::InputMessageNotifier" name="inputMessage" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="supressErrorsCheckBox">
|
||||
<property name="text">
|
||||
@ -202,6 +205,12 @@
|
||||
<extends>QLineEdit</extends>
|
||||
<header>common/shortcutlineedit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>preferences::InputMessageNotifier</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>common/inputmessagenotifier.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -103,6 +103,11 @@ void FilesWidget::on_destinationToolButton_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void FilesWidget::on_destinationLineEdit_textChanged(const QString &text)
|
||||
{
|
||||
ui->inputMessage->updateInstance("destination", text);
|
||||
}
|
||||
|
||||
void FilesWidget::on_sourceLineEdit_textChanged(const QString &text)
|
||||
{
|
||||
if (text.contains('*') || text.contains('?'))
|
||||
@ -117,6 +122,7 @@ void FilesWidget::on_sourceLineEdit_textChanged(const QString &text)
|
||||
|
||||
ui->destinationLabel->setText(tr("Destination file:"));
|
||||
}
|
||||
ui->inputMessage->updateInstance("source_file", text);
|
||||
}
|
||||
|
||||
} // namespace preferences
|
||||
|
Loading…
x
Reference in New Issue
Block a user