aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/converter
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-08-30 17:45:38 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-08-30 17:45:38 +0000
commit39556dbfe68a0b153825b0c75c8cb3f2dc5c1094 (patch)
treea35813d4615bef2016d5be5fbd22f95bc084d042 /src/plugins/General/converter
parent53388fec83220c0a42e769484f321add84b35741 (diff)
downloadqmmp-39556dbfe68a0b153825b0c75c8cb3f2dc5c1094.tar.gz
qmmp-39556dbfe68a0b153825b0c75c8cb3f2dc5c1094.tar.bz2
qmmp-39556dbfe68a0b153825b0c75c8cb3f2dc5c1094.zip
some oss fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2325 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/converter')
0 files changed, 0 insertions, 0 deletions
******************************************************* * Copyright (C) 2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include <QMenu> #include "columneditor_p.h" #include "ui_columneditor.h" ColumnEditor::ColumnEditor(const QString &name, const QString &patt, QWidget *parent) : QDialog(parent), m_ui(new Ui::ColumnEditor) { m_ui->setupUi(this); createMenu(); fillTypes(); //load inital values m_ui->nameLineEdit->setText(name); m_ui->formatLineEdit->setText(patt); } ColumnEditor::~ColumnEditor() { delete m_ui; } QString ColumnEditor::name() const { return m_ui->nameLineEdit->text(); } QString ColumnEditor::pattern() const { return m_ui->formatLineEdit->text(); } void ColumnEditor::insertExpression(QAction *a) { if (m_ui->formatLineEdit->cursorPosition () < 1) m_ui->formatLineEdit->insert(a->data().toString()); else m_ui->formatLineEdit->insert(" - "+a->data().toString()); } void ColumnEditor::on_comboBox_activated(int index) { m_ui->formatLineEdit->setText(m_ui->comboBox->itemData(index).toString()); m_ui->nameLineEdit->setText(m_ui->comboBox->itemText(index)); } void ColumnEditor::on_formatLineEdit_textChanged(const QString &text) { int index = m_ui->comboBox->findData(text); if(index < 0) index = m_ui->comboBox->findData("custom"); m_ui->comboBox->setCurrentIndex(index); } void ColumnEditor::createMenu() { QMenu *menu = new QMenu(this); menu->addAction(tr("Artist"))->setData("%p"); menu->addAction(tr("Album"))->setData("%a"); menu->addAction(tr("Album Artist"))->setData("%aa"); menu->addAction(tr("Title"))->setData("%t"); menu->addAction(tr("Track Number"))->setData("%n"); menu->addAction(tr("Two-digit Track Number"))->setData("%NN"); menu->addAction(tr("Genre"))->setData("%g"); menu->addAction(tr("Comment"))->setData("%c"); menu->addAction(tr("Composer"))->setData("%C"); menu->addAction(tr("Duration"))->setData("%l"); menu->addAction(tr("Disc Number"))->setData("%D"); menu->addAction(tr("File Name"))->setData("%f");