Commit 4d4ff359 authored by Scott Wheeler's avatar Scott Wheeler

Fix a few more classes.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=513966
parent 4af46cd9
......@@ -41,7 +41,7 @@ bool CategoryReaderInterface::isEmpty(TagType category) const
return categoryValue(category).isEmpty();
}
QString CategoryReaderInterface::fixupTrack(const QString &track, unsigned categoryNum) const
QString CategoryReaderInterface::fixupTrack(const QString &track, int categoryNum) const
{
QString str(track);
CategoryID trackId(Track, categoryNum);
......
......@@ -90,7 +90,7 @@ public:
/**
* @return track width for the Track item identified by categoryNum.
*/
virtual int trackWidth(unsigned categoryNum) const = 0;
virtual int trackWidth(int categoryNum) const = 0;
// You probably shouldn't reimplement this
virtual QString value(const CategoryID &category) const;
......@@ -105,7 +105,7 @@ public:
* @return true if a folder separator should be placed between the tags
* at index and index + 1.
*/
virtual bool hasFolderSeparator(unsigned index) const = 0;
virtual bool hasFolderSeparator(int index) const = 0;
virtual bool isDisabled(const CategoryID &category) const = 0;
......@@ -116,7 +116,7 @@ public:
virtual bool isEmpty(TagType category) const;
// You probably shouldn't reimplement this
virtual QString fixupTrack(const QString &track, unsigned categoryNum) const;
virtual QString fixupTrack(const QString &track, int categoryNum) const;
};
#endif /* CATEGORYREADERINTERFACE_H */
......
......@@ -18,7 +18,7 @@
#include <qradiobutton.h>
#include <qlayout.h>
//Added by qt3to4:
#include <QHideEvent>
#include <QShowEvent>
#include <QVBoxLayout>
......
......@@ -17,7 +17,7 @@
#define EXAMPLEOPTIONS_H
#include <qdialog.h>
//Added by qt3to4:
#include <QHideEvent>
#include <QShowEvent>
#include "exampleoptionsbase.h"
......@@ -25,10 +25,10 @@
class ExampleOptions : public ExampleOptionsBase
{
Q_OBJECT
public:
public:
ExampleOptions(QWidget *parent);
protected slots:
protected slots:
virtual void exampleSelectionChanged();
virtual void exampleDataChanged();
virtual void exampleFileChanged();
......@@ -39,7 +39,7 @@ class ExampleOptions : public ExampleOptionsBase
class ExampleOptionsDialog : public QDialog
{
Q_OBJECT
public:
public:
ExampleOptionsDialog(QWidget *parent);
const ExampleOptions *widget() const { return m_options; }
......@@ -48,16 +48,16 @@ class ExampleOptionsDialog : public QDialog
virtual void hideEvent(QHideEvent *);
virtual void showEvent(QShowEvent *);
protected slots:
protected slots:
void fileModeSelected();
signals:
signals:
void fileChanged(const QString &);
void dataChanged();
void signalHidden();
void signalShown();
private:
private:
ExampleOptions *m_options;
};
......
This diff is collapsed.
......@@ -56,7 +56,7 @@ struct Row
TagRenamerOptions options;
CategoryID category; // Includes category and a disambiguation id.
unsigned position; ///< Position in the GUI (0 == top)
int position; ///< Position in the GUI (0 == top)
QString name;
};
......@@ -112,8 +112,8 @@ public:
virtual Q3ValueList<CategoryID> categoryOrder() const;
virtual QString separator() const;
virtual QString musicFolder() const;
virtual int trackWidth(unsigned categoryNum) const;
virtual bool hasFolderSeparator(unsigned index) const;
virtual int trackWidth(int categoryNum) const;
virtual bool hasFolderSeparator(int index) const;
virtual bool isDisabled(const CategoryID &category) const;
private:
......@@ -139,7 +139,7 @@ private:
*
* @author Michael Pyne <michael.pyne@kdemail.net>
*/
class FileRenamerWidget : public FileRenamerBase, public CategoryReaderInterface
class FileRenamerWidget : public QWidget, Ui::FileRenamerBase, public CategoryReaderInterface
{
Q_OBJECT
......@@ -148,7 +148,7 @@ public:
~FileRenamerWidget();
/// Maximum number of total categories the widget will allow.
static unsigned const MAX_CATEGORIES = 16;
static int const MAX_CATEGORIES = 16;
/**
* This function saves all of the category options to the global KConfig
......@@ -199,7 +199,7 @@ private:
* @param category Type of row to append.
* @return identifier of newly added row.
*/
unsigned addRowCategory(TagType category);
int addRowCategory(TagType category);
/**
* Removes the given row, updating the other rows to have the correct
......@@ -208,7 +208,7 @@ private:
* @param id The identifier of the row to remove.
* @return true if the delete succeeded, false otherwise.
*/
bool removeRow(unsigned id);
bool removeRow(int id);
/**
* Updates the mappings currently set for the row identified by oldId so
......@@ -218,7 +218,7 @@ private:
* @param oldId The identifier of the row to change mappings for.
* @param newId The identifier to use instead.
*/
void moveSignalMappings(unsigned oldId, unsigned newId);
void moveSignalMappings(int oldId, int newId);
/**
* This function sets up the internal view by creating the checkboxes and
......@@ -310,7 +310,7 @@ private:
* @param categoryNum Zero-based number of category to get results for (if more than one).
* @return the minimum width of the track category.
*/
virtual int trackWidth(unsigned categoryNum) const
virtual int trackWidth(int categoryNum) const
{
CategoryID id(Track, categoryNum);
return m_rows[findIdentifier(id)].options.trackWidth();
......@@ -323,7 +323,7 @@ private:
* of this function, only categories that are required or non-empty
* should count.
*/
virtual bool hasFolderSeparator(unsigned index) const;
virtual bool hasFolderSeparator(int index) const;
/**
* @param category The category to get the status of.
......@@ -343,7 +343,7 @@ private:
* @param id the identifier of the row to move
* @param direction the direction to move
*/
void moveItem(unsigned id, MovementDirection direction);
void moveItem(int id, MovementDirection direction);
/**
* This function actually performs the work of showing the options dialog for
......@@ -381,7 +381,7 @@ private:
* @param position The position to find the identifier of.
* @return The unique id of the row at \p position.
*/
unsigned idOfPosition(unsigned position) const;
int idOfPosition(int position) const;
/**
* This function returns the identifier of the row in the m_rows index that
......@@ -391,7 +391,7 @@ private:
* @return the identifier of the category, or MAX_CATEGORIES if it couldn't
* be found.
*/
unsigned findIdentifier(const CategoryID &category) const;
int findIdentifier(const CategoryID &category) const;
private slots:
/**
......@@ -531,7 +531,7 @@ private:
* there is not already a folder icon set, and if the folder's name has
* the album name.
*/
void setFolderIcon(const KURL &dst, const PlaylistItem *item);
void setFolderIcon(const KUrl &dst, const PlaylistItem *item);
/**
* Attempts to rename the file from \a src to \a dest. Returns true if the
......
......@@ -299,7 +299,7 @@ void PlayerManager::play(const FileHandle &file)
// Make sure that the player() actually starts before doing anything.
if(!player()->playing()) {
kdWarning(65432) << "Unable to play " << file.absFilePath() << endl;
kWarning(65432) << "Unable to play " << file.absFilePath() << endl;
stop();
return;
}
......
......@@ -1854,9 +1854,9 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl
::closedir(dir);
}
else {
kdWarning(65432) << "Unable to open directory "
<< fileInfo.filePath()
<< ", make sure it is readable.\n";
kWarning(65432) << "Unable to open directory "
<< fileInfo.filePath()
<< ", make sure it is readable.\n";
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment