38 setWindowTitle( tr(
"Pattern properties" ) );
43 patternNameTxt->selectAll();
51 if ( category ==
"" ){
52 category =
"not_categorized";
54 categoryComboBox->addItem( category );
58 std::list<QString>::const_iterator cur_patternCategories;
68 if ( categoryComboBox->currentText() != *cur_patternCategories ){
69 categoryComboBox->addItem( *cur_patternCategories );
74 okBtn->setEnabled(
true);
94 QString pattName = patternNameTxt->text();
95 QString pattCategory = categoryComboBox->currentText();
96 QString pattInfo = patternDescTxt->toPlainText();
103 std::list<QString>::const_iterator cur_testpatternCategories;
108 if ( categoryComboBox->currentText() == *cur_testpatternCategories ){
136 patternNameTxt->setText(pattName);
std::shared_ptr< Song > getSong() const
Get the current song.
static Hydrogen * get_instance()
Returns the current Hydrogen instance __instance.
PatternList is a collection of patterns.
bool check_name(QString patternName, Pattern *ignore=NULL)
check if a pattern with name patternName already exists in this list
QString find_unused_pattern_name(QString sourceName, Pattern *ignore=NULL)
find unused patternName
Pattern class is a Note container.
const QString & get_info() const
get the category of the pattern
void set_name(const QString &name)
get the name of the pattern
const QString & get_name() const
set the category of the pattern
const QString & get_category() const
set the length of the pattern
void set_info(const QString &info)
get the info of the pattern
void set_category(const QString &category)
set the info of the pattern
Manager for User Preferences File (singleton)
static Preferences * get_instance()
Returns a pointer to the current Preferences singleton stored in __instance.
std::list< QString > m_patternCategories
static HydrogenApp * get_instance()
Returns the instance of HydrogenApp class.
QUndoStack * m_pUndoStack
~PatternPropertiesDialog()
Destructor.
void on_cancelBtn_clicked()
PatternPropertiesDialog(QWidget *parent, H2Core::Pattern *pattern, int nselectedPattern, bool save)
void defaultNameCheck(QString, bool)
Does some name check.
H2Core::Pattern * pattern