本文整理汇总了C++中Extensions::multimedia方法的典型用法代码示例。如果您正苦于以下问题:C++ Extensions::multimedia方法的具体用法?C++ Extensions::multimedia怎么用?C++ Extensions::multimedia使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Extensions
的用法示例。
在下文中一共展示了Extensions::multimedia方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrefWidget
PrefAssociations::PrefAssociations(QWidget * parent, Qt::WindowFlags f)
: PrefWidget(parent, f )
{
setupUi(this);
connect(selectAll, SIGNAL(clicked(bool)), this, SLOT(selectAllClicked(bool)));
connect(selectNone, SIGNAL(clicked(bool)), this, SLOT(selectNoneClicked(bool)));
connect(listWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(listItemClicked(QListWidgetItem*)));
connect(listWidget, SIGNAL(itemPressed(QListWidgetItem*)), this, SLOT(listItemPressed(QListWidgetItem*)));
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
{
//Hide Select None - One cannot restore an association in Vista. Go figure.
selectNone->hide();
//QPushButton* lpbButton = new QPushButton("Launch Program Defaults", this);
//hboxLayout->addWidget(lpbButton);
//connect(lpbButton, SIGNAL(clicked(bool)), this, SLOT(launchAppDefaults()));
}
Extensions e;
for (int n=0; n < e.multimedia().count(); n++) {
addItem( e.multimedia()[n] );
}
// Add the playlist extensions
for (int n=0; n < e.playlist().count(); n++) {
addItem( e.playlist()[n] );
}
retranslateStrings();
something_changed = false;
}
示例2: processArgs
SMPlayer::ExitCode SMPlayer::processArgs(QStringList args) {
qDebug("SMPlayer::processArgs: arguments: %d", args.count());
for (int n = 0; n < args.count(); n++) {
qDebug("SMPlayer::processArgs: %d = %s", n, args[n].toUtf8().data());
}
QString action; // Action to be passed to running instance
bool show_help = false;
if (!pref->gui.isEmpty()) gui_to_use = pref->gui;
bool add_to_playlist = false;
#ifdef Q_OS_WIN
if (args.contains("-uninstall")) {
#if USE_ASSOCIATIONS
//Called by uninstaller. Will restore old associations.
WinFileAssoc RegAssoc;
Extensions exts;
QStringList regExts;
RegAssoc.GetRegisteredExtensions(exts.multimedia(), regExts);
RegAssoc.RestoreFileAssociations(regExts);
printf("Restored associations\n");
#endif
return NoError;
}
#endif
if (args.contains("-delete-config")) {
CleanConfig::clean(Paths::configPath());
return NoError;
}
for (int n = 1; n < args.count(); n++) {
QString argument = args[n];
if (argument == "-send-action") {
if (n+1 < args.count()) {
n++;
action = args[n];
} else {
printf("Error: expected parameter for -send-action\r\n");
return ErrorArgument;
}
}
else
if (argument == "-actions") {
if (n+1 < args.count()) {
n++;
actions_list = args[n];
} else {
printf("Error: expected parameter for -actions\r\n");
return ErrorArgument;
}
}
else
if (argument == "-sub") {
if (n+1 < args.count()) {
n++;
QString file = args[n];
if (QFile::exists(file)) {
subtitle_file = QFileInfo(file).absoluteFilePath();
} else {
printf("Error: file '%s' doesn't exists\r\n", file.toUtf8().constData());
}
} else {
printf("Error: expected parameter for -sub\r\n");
return ErrorArgument;
}
}
else
if (argument == "-pos") {
if (n+2 < args.count()) {
bool ok_x, ok_y;
n++;
gui_position.setX( args[n].toInt(&ok_x) );
n++;
gui_position.setY( args[n].toInt(&ok_y) );
if (ok_x && ok_y) move_gui = true;
} else {
printf("Error: expected parameter for -pos\r\n");
return ErrorArgument;
}
}
else
if (argument == "-size") {
if (n+2 < args.count()) {
bool ok_width, ok_height;
n++;
gui_size.setWidth( args[n].toInt(&ok_width) );
n++;
gui_size.setHeight( args[n].toInt(&ok_height) );
if (ok_width && ok_height) resize_gui = true;
} else {
printf("Error: expected parameter for -resize\r\n");
return ErrorArgument;
}
}
else
if ((argument == "--help") || (argument == "-help") ||
//.........这里部分代码省略.........